From d368b688d067f3c657e5412245ab0cfd69c66bc4 Mon Sep 17 00:00:00 2001 From: richard-dds Date: Wed, 28 Nov 2018 16:54:41 -0500 Subject: [PATCH] Display details of user that accepted invitation --- atst/models/invitation.py | 4 ++++ templates/audit_log.html | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/atst/models/invitation.py b/atst/models/invitation.py index cfa1a450..14772fec 100644 --- a/atst/models/invitation.py +++ b/atst/models/invitation.py @@ -112,3 +112,7 @@ class Invitation(Base, TimestampsMixin, AuditableMixin): change_set["status"] = [s.name for s in changes["status"]] return change_set + + @property + def workspace_id(self): + return self.workspace_role.workspace_id diff --git a/templates/audit_log.html b/templates/audit_log.html index 09fd800c..cacd164b 100644 --- a/templates/audit_log.html +++ b/templates/audit_log.html @@ -42,10 +42,9 @@
{% elif event.event_details and event.resource_type == "invitation" %} - {% set now_pending = event.changed_state.status and event.changed_state.status.1 == "PENDING" %} - {% if now_pending %} - now pending - {{ event.changed_state.status.1 }} + {% set accepted = event.changed_state.status and event.changed_state.status.1 == "ACCEPTED" %} + {% if accepted %} + accepted by {{ event.event_details.email }} (DOD {{ event.event_details.dod_id }}) {% endif %} {% endif %}