summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-03-02 12:46:11 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-03-02 12:46:11 +0100
commit17bdf00cf6146ffde0ed68c587537f59b74cb835 (patch)
treefe6d093c9ce59c828a9592a118e3008928f25909
parent078424d6ca6fc9b84b6d566855234a72b7c5eef1 (diff)
downloadIshtar-WIP/v4.0.tar.bz2
Ishtar-WIP/v4.0.zip
Sheet operation - statistics number of parcels fix (refs #3726)WIP/v4.0
-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