Route for accepting an application invitation.

- Domain method for enabling an application role.
- Updated ApplicationRole model `history` property so that it serializes
  the `status` correctly
This commit is contained in:
dandds
2019-05-03 06:21:30 -04:00
parent d8771accca
commit a2ebdf78a0
7 changed files with 71 additions and 3 deletions

View File

@@ -62,7 +62,13 @@ class ApplicationRole(
@property
def history(self):
return self.get_changes()
previous_state = self.get_changes()
change_set = {}
if "status" in previous_state:
from_status = previous_state["status"][0].value
to_status = self.status.value
change_set["status"] = [from_status, to_status]
return change_set
def has_permission_set(self, perm_set_name):
return first_or_none(