summaryrefslogtreecommitdiffstats
path: root/lib/toaster/orm/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/toaster/orm/models.py')
-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