Check if invite cannot be resent before raising error
This commit is contained in:
@@ -103,6 +103,10 @@ class Invitation(Base, TimestampsMixin, AuditableMixin):
|
||||
def is_revokable(self):
|
||||
return self.is_pending and not self.is_expired
|
||||
|
||||
@property
|
||||
def can_resend(self):
|
||||
return self.is_pending or self.is_expired
|
||||
|
||||
@property
|
||||
def user_dod_id(self):
|
||||
return self.user.dod_id if self.user is not None else None
|
||||
|
||||
Reference in New Issue
Block a user