summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-03-09 13:01:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-09 22:46:32 +0000
commitde8baedaccb451c12bc3f642449db3f64aed6bf7 (patch)
treece70910bdea49bc961d8bf0f30c7f71adcee30b0
parentefa6f915566b979bdbad233ae195b413cef1b8da (diff)
downloadopenembedded-core-contrib-de8baedaccb451c12bc3f642449db3f64aed6bf7.tar.gz
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] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/toaster/orm/models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index cfc6ea87c2..add2adea06 100644
--- a/lib/toaster/orm/models.py
+++ b/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