Skip to content
Snippets Groups Projects
Commit f93836cb authored by Alexa Valentová's avatar Alexa Valentová
Browse files

fix obj.contract

parent fd5f40c9
No related branches found
No related tags found
No related merge requests found
Pipeline #17179 passed
...@@ -157,7 +157,10 @@ class ContracteeSignatureRepresentativeInline( ...@@ -157,7 +157,10 @@ class ContracteeSignatureRepresentativeInline(
formset = SingnatureRepresentativeFormSet formset = SingnatureRepresentativeFormSet
def get_parent_object_is_editable(self, obj): def get_parent_object_is_editable(self, obj):
return obj.contract.is_editable_without_approve_permission if hasattr(obj, "contract"):
return obj.contract.is_editable_without_approve_permission
else:
return obj.is_editable_without_approve_permission
def get_formset(self, request, obj=None, **kwargs): def get_formset(self, request, obj=None, **kwargs):
formset = super().get_formset(request, obj, **kwargs) formset = super().get_formset(request, obj, **kwargs)
...@@ -177,7 +180,10 @@ class SigneeSignatureRepresentativeInline( ...@@ -177,7 +180,10 @@ class SigneeSignatureRepresentativeInline(
ParentContractInlineMixin, NestedStackedInline ParentContractInlineMixin, NestedStackedInline
): ):
def get_parent_object_is_editable(self, obj): def get_parent_object_is_editable(self, obj):
return obj.contract.is_editable_without_approve_permission if hasattr(obj, "contract"):
return obj.contract.is_editable_without_approve_permission
else:
return obj.is_editable_without_approve_permission
model = SigneeSignatureRepresentative model = SigneeSignatureRepresentative
extra = 0 extra = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment