diff --git a/atst/domain/workspace_roles.py b/atst/domain/workspace_roles.py index c99b7390..131cbac9 100644 --- a/atst/domain/workspace_roles.py +++ b/atst/domain/workspace_roles.py @@ -2,7 +2,9 @@ from sqlalchemy.orm.exc import NoResultFound from atst.database import db from atst.models.workspace_role import ( - WorkspaceRole, Status as WorkspaceRoleStatus, MEMBER_STATUSES + WorkspaceRole, + Status as WorkspaceRoleStatus, + MEMBER_STATUSES, ) from atst.models.user import User @@ -12,8 +14,7 @@ from .exceptions import NotFoundError MEMBER_STATUS_CHOICES = [ - dict(name=key, display_name=value) - for key, value in MEMBER_STATUSES.items() + dict(name=key, display_name=value) for key, value in MEMBER_STATUSES.items() ] diff --git a/atst/models/workspace_role.py b/atst/models/workspace_role.py index 1da0bce8..4bd241df 100644 --- a/atst/models/workspace_role.py +++ b/atst/models/workspace_role.py @@ -82,21 +82,21 @@ class WorkspaceRole(Base, mixins.TimestampsMixin, mixins.AuditableMixin): @property def display_status(self): if self.status == Status.ACTIVE: - return MEMBER_STATUSES['active'] + return MEMBER_STATUSES["active"] elif self.latest_invitation: if self.latest_invitation.is_revoked: - return MEMBER_STATUSES['revoked'] + return MEMBER_STATUSES["revoked"] elif self.latest_invitation.is_rejected_wrong_user: - return MEMBER_STATUSES['error'] + return MEMBER_STATUSES["error"] elif ( self.latest_invitation.is_rejected_expired or self.latest_invitation.is_expired ): - return MEMBER_STATUSES['expired'] + return MEMBER_STATUSES["expired"] else: - return MEMBER_STATUSES['pending'] + return MEMBER_STATUSES["pending"] else: - return MEMBER_STATUSES['unknown'] + return MEMBER_STATUSES["unknown"] @property def has_dod_id_error(self):