diff options
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index ab6940feafc..50f703c415e 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 |