From fa8c59b9447ca0b0394d370977b10febc06f518c Mon Sep 17 00:00:00 2001 From: richard-dds Date: Mon, 19 Nov 2018 16:25:11 -0500 Subject: [PATCH] Show proper display_status --- atst/models/workspace_role.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/atst/models/workspace_role.py b/atst/models/workspace_role.py index 4bd241df..238eab98 100644 --- a/atst/models/workspace_role.py +++ b/atst/models/workspace_role.py @@ -20,6 +20,7 @@ MEMBER_STATUSES = { "error": "Error on invite", "pending": "Pending", "unknown": "Unknown errors", + "disabled": "Disabled" } @@ -83,6 +84,8 @@ class WorkspaceRole(Base, mixins.TimestampsMixin, mixins.AuditableMixin): def display_status(self): if self.status == Status.ACTIVE: return MEMBER_STATUSES["active"] + elif self.status == Status.DISABLED: + return MEMBER_STATUSES["disabled"] elif self.latest_invitation: if self.latest_invitation.is_revoked: return MEMBER_STATUSES["revoked"]