diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-10 18:02:50 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-10 18:02:50 +0200 |
| commit | 0c185f1abbe9abe0d977e1b7d1d3f0440b8d6371 (patch) | |
| tree | f84171501c3d98df394c94fcc6d32cc3dd5c6539 /archaeological_finds/models_finds.py | |
| parent | 389f86b06d5f6129614cb312c7034cdc4bb1b684 (diff) | |
| download | Ishtar-0c185f1abbe9abe0d977e1b7d1d3f0440b8d6371.tar.bz2 Ishtar-0c185f1abbe9abe0d977e1b7d1d3f0440b8d6371.zip | |
Locks: prevent edit actions
Diffstat (limited to 'archaeological_finds/models_finds.py')
| -rw-r--r-- | archaeological_finds/models_finds.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 6914ff019..9b134bceb 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1742,8 +1742,9 @@ class Find(BulkUpdatedItem, ValueGetter, DocumentItem, BaseHistorizedItem, # own basket actions = super(Find, self).get_extra_actions(request) + is_locked = getattr(self, "locked", False) can_edit_find = self.can_do(request, 'change_find') - if can_edit_find: + if can_edit_find and not is_locked: actions += [ (reverse("find-qa-duplicate", args=[self.pk]), _("Duplicate"), "fa fa-clone", "", "", True), |
