summaryrefslogtreecommitdiff
path: root/packages/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/utils.py')
-rw-r--r--packages/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/utils.py b/packages/utils.py
index 0f47f170..c38aa840 100644
--- a/packages/utils.py
+++ b/packages/utils.py
@@ -137,6 +137,10 @@ SELECT p.id, q.id
)
WHERE p.arch_id IN (%s, %s)
AND (
+ q.arch_id IN (%s, %s)
+ OR q.id IS NULL
+ )
+ AND (
q.id IS NULL
OR p.pkgver != q.pkgver
OR p.pkgrel != q.pkgrel
@@ -144,7 +148,7 @@ SELECT p.id, q.id
)
"""
cursor = connection.cursor()
- cursor.execute(sql, [arch_a.id, arch_b.id])
+ cursor.execute(sql, [arch_a.id, arch_b.id, arch_a.id, arch_b.id])
results = cursor.fetchall()
# column A will always have a value, column B might be NULL
to_fetch = {row[0] for row in results}