summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog/en/changelog_2022-06-15.md1
-rw-r--r--changelog/fr/changelog_2023-01-25.md1
-rw-r--r--ishtar_common/views_item.py2
3 files changed, 3 insertions, 1 deletions
diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md
index 55ab4efb0..fc8efbcc3 100644
--- a/changelog/en/changelog_2022-06-15.md
+++ b/changelog/en/changelog_2022-06-15.md
@@ -3,6 +3,7 @@ v4.0.55 - 2099-12-31
### Technical ###
- `ishtar_maintenance` script: add "filter" option in order to limit script to a specific query
+- fix crash with no search counted
v4.0.54 - 2023-07-19
--------------------
diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md
index 4e085b3ca..7dad66905 100644
--- a/changelog/fr/changelog_2023-01-25.md
+++ b/changelog/fr/changelog_2023-01-25.md
@@ -3,6 +3,7 @@ v4.0.55 - 2099-12-31
### Technique ###
- script `ishtar_maintenance` : ajout de l'option "filter" afin de limiter le script à une requête spécifique
+- correction de crash quand aucune recherche n'est comptabilisée
v4.0.54 - 2023-07-19
--------------------
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: