diff options
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r-- | archaeological_files/models.py | 13 |
1 files changed, 13 insertions, 0 deletions
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", @@ -937,6 +938,18 @@ class File( 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( [getattr(self, k) for k in ("locality", "address") if getattr(self, k)] |