diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-07-24 12:56:02 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-07-24 13:02:10 +0200 |
commit | 9b4ea146b396d1096d052b3b2cffe72ef7585f0f (patch) | |
tree | 2fc15dd5efdbc22d8e96ab42c93e3bdf497f4d85 /ishtar_common | |
parent | d882ede1626159293b99097d2761e8b1c8884b9c (diff) | |
download | Ishtar-9b4ea146b396d1096d052b3b2cffe72ef7585f0f.tar.bz2 Ishtar-9b4ea146b396d1096d052b3b2cffe72ef7585f0f.zip |
🐛 Fix crash with no search counted (refs #5613)
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/views_item.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index da1543e7b..70ae0f2d0 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -2183,7 +2183,7 @@ def get_item( items = items.distinct() try: - items_nb = items.values("pk").aggregate(Count("pk"))["pk__count"] + items_nb = items.values("pk").aggregate(Count("pk"))["pk__count"] or 0 except ProgrammingError: items_nb = 0 if count: |