~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/model/sourcepackagerecipe.py

slightly nicer...

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
    name = Unicode(allow_none=True)
48
48
 
49
 
    _recipe_data = Reference(
50
 
        "SourcePackageRecipe.id",
51
 
        "_SourcePackageRecipeData.sourcepackage_recipe_id", on_remote=True)
 
49
    @property
 
50
    def _recipe_data(self):
 
51
        return Store.of(self).find(
 
52
            _SourcePackageRecipeData,
 
53
            _SourcePackageRecipeData.sourcepackage_recipe == self).one()
52
54
 
53
55
    def _get_builder_recipe(self):
54
56
        """Accesses of the recipe go to the _SourcePackageRecipeData."""
55
 
        Store.of(self).flush()
56
57
        return self._recipe_data.getRecipe()
57
58
 
58
59
    def _set_builder_recipe(self, value):
63
64
 
64
65
    def getReferencedBranches(self):
65
66
        """See `ISourcePackageRecipe.getReferencedBranches`."""
66
 
        Store.of(self).flush()
67
67
        return self._recipe_data.getReferencedBranches()
68
68
 
69
69
    @staticmethod