summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.md4
-rw-r--r--archaeological_operations/models.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 1475004f5..57626d74e 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -33,8 +33,10 @@ Ishtar changelog
- improve many facet query
- Document - source type is now a hierarchic search
- Find form: remove TAQ/TPQ check
-- Sheet: fix treatment and file treatment sheet display (bad QR code link)
- File: filter plan action when preventive_operator is activated in profile
+- Sheet:
+ - fix treatment and file treatment sheet display (bad QR code link)
+ - Operation - statistics number of parcels fix
v4.0.42 - 2023-01-25
--------------------
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index fda6101d2..204385c25 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -1998,10 +1998,10 @@ class Operation(
def nb_parcels(self):
_("Number of parcels")
nb = 0
- if self.associated_file:
- nb = self.associated_file.parcels.count()
if not nb:
nb = self.parcels.count()
+ if self.associated_file:
+ nb = self.associated_file.parcels.count()
return nb
@property