| |
@@ -5381,6 +5381,8 @@
|
| |
values=locals())
|
| |
result = set(query.execute())
|
| |
candidate_buildroot_ids = result
|
| |
+ if not candidate_buildroot_ids:
|
| |
+ return []
|
| |
|
| |
if archiveID is not None:
|
| |
joins.insert(0, 'buildroot_archives ON buildroot.id = buildroot_archives.buildroot_id')
|
| |
@@ -5393,6 +5395,8 @@
|
| |
candidate_buildroot_ids &= result
|
| |
else:
|
| |
candidate_buildroot_ids = result
|
| |
+ if not candidate_buildroot_ids:
|
| |
+ return []
|
| |
|
| |
if taskID is not None:
|
| |
clauses.append('standard_buildroot.task_id = %(taskID)i')
|
| |
@@ -5404,6 +5408,8 @@
|
| |
candidate_buildroot_ids &= result
|
| |
else:
|
| |
candidate_buildroot_ids = result
|
| |
+ if not candidate_buildroot_ids:
|
| |
+ return []
|
| |
|
| |
if candidate_buildroot_ids:
|
| |
candidate_buildroot_ids = list(candidate_buildroot_ids)
|
| |
If candidate_buildroot_ids are pruned to zero in some point,
query_buildroots have to return. Otherwise big working queryset will be
created eating resources and returning empty list anyway.
Fixes: https://pagure.io/koji/issue/2298