From f3764eea1ac4a6cdb12095322a00fd93d377c2c5 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 15 Nov 2024 11:51:49 +0100 Subject: ✨ adapt sheet to manage sheet filters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_files/models.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'archaeological_files/models.py') diff --git a/archaeological_files/models.py b/archaeological_files/models.py index bea129ea8..3b272a333 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -620,6 +620,7 @@ class File( HISTORICAL_M2M = ["towns", "departments"] SERIALIZE_PROPERTIES = ["external_id"] + SHEET_EMPTY_KEYS = ["has_jobs", "has_ground_jobs"] QA_LINK = QuickAction( url="file-qa-link", icon_class="fa fa-link", @@ -936,6 +937,18 @@ class File( return val return self.update_has_admin_act(cache_key) + @property + def has_equipment_costs(self): + return self.equipment_costs.exists() + + @property + def has_ground_jobs(self): + return self.ground_jobs.exists() + + @property + def has_jobs(self): + return self.jobs.exists() + @property def get_locality(self): return " - ".join( -- cgit v1.2.3