[Toaster] [PATCH] toaster: models List only have the specified project's imported layers

Michael Wood michael.g.wood at intel.com
Tue Feb 16 02:25:31 PST 2016


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 at intel.com>
---
 bitbake/lib/toaster/orm/models.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index ab6940f..50f703c 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -259,8 +259,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
 
-- 
2.1.4



More information about the toaster mailing list