Merge pull request #1203 from dod-ccpo/new-portfolio-validation

Bugfixes
This commit is contained in:
leigh-mil
2019-11-25 09:46:27 -05:00
committed by GitHub
10 changed files with 19 additions and 34 deletions

View File

@@ -113,19 +113,17 @@ class ApplicationRole(
@property
def display_status(self):
if (
self.is_pending
and self.latest_invitation
and self.latest_invitation.is_pending
):
return "invite_pending"
elif (
self.is_pending
and self.latest_invitation
and self.latest_invitation.is_expired
):
return "invite_expired"
elif (
self.is_pending
and self.latest_invitation
and self.latest_invitation.is_pending
):
return "invite_pending"
elif self.is_active and any(
env_role.is_pending for env_role in self.environment_roles
):