fix: attr error if non-admin updates relationship

This commit is contained in:
James Graham
2021-03-11 12:59:57 +00:00
parent 87e5e6cbf3
commit 583a49fdd3
2 changed files with 20 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ class RelationshipUpdateView(permissions.UserIsLinkedPersonMixin, UpdateView):
def get_test_person(self) -> models.Person:
"""Get the person instance which should be used for access control checks."""
return self.object.source
return self.get_object().source
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)