summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Gladky <gladk@debian.org>2022-08-16 22:18:47 +0200
committerAnton Gladky <gladk@debian.org>2022-08-16 22:18:47 +0200
commitf50b11cfa293b3d86e3728f53f0e8965909e8e33 (patch)
tree4a2a5fdfa527838d7b23729f10e7499e9474a033
parenta33c360942ab7a10d9bce039ab5f154d83ed868c (diff)
Use COALESCE for the querry.fix_987283
Thanks to Florian for the tip
-rw-r--r--lib/python/security_db.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/python/security_db.py b/lib/python/security_db.py
index 35d61f104b..0c0d6dfe46 100644
--- a/lib/python/security_db.py
+++ b/lib/python/security_db.py
@@ -2074,9 +2074,7 @@ class DB:
cursor = self.cursor()
last_bug = None
- show_ignored_sql = ""
- if (not show_ignored):
- show_ignored_sql = "AND source_package_status.debian_bug_file = 1"
+ show_ignored_sql = f" AND COALESCE (debian_bug_file = {1 if show_ignored else 0}, NULL)"
result = []
for bug, pkg in cursor.execute(

© 2014-2022 Faster IT GmbH | imprint | privacy policy