Audit when a service is archived ("deleted")

This is similar to the previous commit. I've used the term 'archive'
to match the rest of the code - services aren't ever truly deleted.
This commit is contained in:
Ben Thorner
2021-07-08 15:30:31 +01:00
parent bb4c86008a
commit 301908460a
4 changed files with 39 additions and 2 deletions

View File

@@ -78,6 +78,17 @@ def create_suspend_service_event(
)
def create_archive_service_event(
service_id,
archived_by_id,
):
_send_event(
'archive_service',
service_id=service_id,
archived_by_id=archived_by_id,
)
def _send_event(event_type, **kwargs):
event_data = _construct_event_data(request)
event_data.update(kwargs)