From 05ed481007604079612aa4b0f1f3bb8d4d35a6e5 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 10 Sep 2019 18:02:50 +0200 Subject: Locks: prevent edit actions --- ishtar_common/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index bc9e68c02..f673aed85 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1825,7 +1825,7 @@ class DocumentItem(object): return actions can_add_doc = self.can_do(request, 'add_document') - if can_add_doc: + if can_add_doc and not getattr(self, "locked", False): actions = [ ( reverse("create-document") + "?{}={}".format( -- cgit v1.2.3