refactor: views to handled ended relationships

Add ending of organisation relationships
This commit is contained in:
James Graham
2021-03-19 12:41:36 +00:00
parent 42d95beb5a
commit 74fffb0cac
8 changed files with 156 additions and 56 deletions

View File

@@ -116,6 +116,14 @@ class RelationshipEndView(permissions.UserIsLinkedPersonMixin,
return relationship.target.get_absolute_url()
class OrganisationRelationshipEndView(RelationshipEndView):
"""View for marking an organisation relationship as ended.
Sets `replaced_timestamp` on all answer sets where this is currently null.
"""
model = models.OrganisationRelationship
class OrganisationRelationshipDetailView(permissions.UserIsLinkedPersonMixin,
DetailView):
"""View displaying details of an :class:`OrganisationRelationship`."""