Check if invite cannot be resent before raising error

This commit is contained in:
leigh-mil
2019-03-14 14:51:32 -04:00
committed by Montana
parent 6d43153785
commit e2bf820de6
2 changed files with 9 additions and 3 deletions

View File

@@ -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