Simplify env role history attribute

This commit is contained in:
Montana 2018-11-27 14:48:23 -05:00
parent 0615bcef89
commit 2105388f37

View File

@ -31,13 +31,7 @@ class EnvironmentRole(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
@property
def history(self):
previous_state = self.get_changes()
change_set = {}
if "role" in previous_state:
from_role = previous_state["role"][0]
to_role = self.role
change_set["role"] = [from_role, to_role]
return change_set
return self.get_changes()
@property
def event_details(self):