From ff94c9d11e5121ca61acac523fcc2a77757b5114 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 20 Nov 2024 10:09:18 +0100 Subject: 🐛 fix model actions for specific permissions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 84bd8ab2e..fa5abce22 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -2216,7 +2216,7 @@ class Operation( if can_add_cr and not is_locked: start = actions end = [] - if actions[-1] and actions[-1][0].startswith("/document/create"): + if actions and actions[-1] and actions[-1][0].startswith("/document/create"): start = actions[:-1] end = [actions[-1]] actions = start + [ -- cgit v1.2.3