From ff8681360e589ff3c8e63dcef6ad0d31ac8ecab8 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 24 Sep 2019 10:33:07 +0200 Subject: Allow own locker to edit their locks --- archaeological_operations/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archaeological_operations/models.py') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 19e528de1..d826d3c79 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1324,7 +1324,7 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem, actions = super(Operation, self).get_extra_actions(request) can_add_cr = self.can_do(request, 'add_contextrecord') - if can_add_cr and not self.locked: + if can_add_cr and not self.is_locked(request.user): actions += [ (reverse('operation-qa-contextrecord', args=[self.pk]), _("Add context record"), "fa fa-plus", -- cgit v1.2.3