From 17bdf00cf6146ffde0ed68c587537f59b74cb835 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 2 Mar 2023 12:46:11 +0100 Subject: Sheet operation - statistics number of parcels fix (refs #3726) --- CHANGES.md | 4 +++- archaeological_operations/models.py | 4 ++-- 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 -- cgit v1.2.3