All conditions are met by this point; no branch really exists
This commit is contained in:
parent
2e2eff2e8e
commit
4d834e65c7
@ -84,7 +84,7 @@ class Invitations(object):
|
|||||||
elif invite.is_accepted or invite.is_revoked or invite.is_rejected:
|
elif invite.is_accepted or invite.is_revoked or invite.is_rejected:
|
||||||
raise InvitationError(invite)
|
raise InvitationError(invite)
|
||||||
|
|
||||||
elif invite.is_pending:
|
elif invite.is_pending: # pragma: no branch
|
||||||
Invitations._update_status(invite, InvitationStatus.ACCEPTED)
|
Invitations._update_status(invite, InvitationStatus.ACCEPTED)
|
||||||
WorkspaceRoles.enable(invite.workspace_role)
|
WorkspaceRoles.enable(invite.workspace_role)
|
||||||
return invite
|
return invite
|
||||||
|
@ -81,7 +81,7 @@ class Invitation(Base, TimestampsMixin, AuditableMixin):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def workspace(self):
|
def workspace(self):
|
||||||
if self.workspace_role: #pragma: no branch
|
if self.workspace_role: # pragma: no branch
|
||||||
return self.workspace_role.workspace
|
return self.workspace_role.workspace
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user