diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-13 14:13:46 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-13 14:13:46 +0200 |
commit | 9c0ee6ee690f176dd6c944d263ec45678ebec49e (patch) | |
tree | 8abead0cd473127fcbd18fd9581470af8f48e654 /archaeological_operations/models.py | |
parent | 801e31fc093bc554ae62ff50a5540659634098b4 (diff) | |
download | Ishtar-9c0ee6ee690f176dd6c944d263ec45678ebec49e.tar.bz2 Ishtar-9c0ee6ee690f176dd6c944d263ec45678ebec49e.zip |
Delete action: context records, files, finds, treatments, treatments files, admin acts
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index a120e7db5..91162f05c 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -2050,6 +2050,15 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): "Can delete own Administrative act"), ) + @property + def DELETE_URL(self): + if self.associated_file: + return 'delete-administrativeact-file' + if self.treatment: + return 'delete-administrativeact-treatment' + if self.treatment_file: + return 'delete-administrativeact-treatmentfile' + def __str__(self): return settings.JOINT.join( [str(item) for item in [ |