From fd5f40c97035079a1761fe28eb86a082621931c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <tomas@imaniti.org>
Date: Wed, 28 Feb 2024 16:01:17 +0100
Subject: [PATCH] fix arg

---
 contracts/admin.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contracts/admin.py b/contracts/admin.py
index 54e9fb1..14816c9 100644
--- a/contracts/admin.py
+++ b/contracts/admin.py
@@ -129,7 +129,7 @@ class ParentContractInlineMixin:
         if (
             obj is not None
             and not request.user.has_perm("contracts.edit_when_approved")
-            and not self.get_parent_object_is_editable()
+            and not self.get_parent_object_is_editable(obj)
         ):
             return False
 
@@ -142,7 +142,7 @@ class ParentContractInlineMixin:
         if (
             obj is not None
             and not request.user.has_perm("contracts.delete_when_approved")
-            and not self.get_parent_object_is_editable()
+            and not self.get_parent_object_is_editable(obj)
         ):
             return False
 
-- 
GitLab