From: Michael Wood Date: Wed, 9 Mar 2016 13:01:24 +0000 (+0000) Subject: bitbake: toaster: models List only have the specified project's imported layers X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0f0105932cbb364041d3380740ba481250bffe32;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: toaster: models List only have the specified project's imported layers When returning the compatible layers make sure that we are only listing: All the layers which are for this release && configuration layers (i.e. aren't part of the build history) and which aren't an imported layer OR are this project's imported layer(s). [YOCTO #8944] (Bitbake rev: de8baedaccb451c12bc3f642449db3f64aed6bf7) Signed-off-by: Michael Wood Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index cfc6ea87c2e..add2adea06f 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -262,8 +262,10 @@ class Project(models.Model): """ Returns Queryset of all Layer_Versions which are compatible with this project""" queryset = Layer_Version.objects.filter( - (Q(up_branch__name=self.release.branch_name) & Q(build=None)) - | Q(project=self)) + (Q(up_branch__name=self.release.branch_name) & + Q(build=None) & + Q(project=None)) | + Q(project=self)) return queryset