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 | 6969da6fc4bc8b551d94ca328400e7609c50595d (patch) | |
| tree | 8abead0cd473127fcbd18fd9581470af8f48e654 /archaeological_operations/models.py | |
| parent | 2e608dde86b1de6fa5b66ebbbcd8c1b719981b45 (diff) | |
| download | Ishtar-6969da6fc4bc8b551d94ca328400e7609c50595d.tar.bz2 Ishtar-6969da6fc4bc8b551d94ca328400e7609c50595d.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 [  | 
