mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Short circuit if team member is already invited
It would be confusing if people got invited twice, so let’s tell people if someone’s has a pending invite.
This commit is contained in:
@@ -160,6 +160,12 @@ class Service(JSONModel):
|
||||
def invited_users(self):
|
||||
return InvitedUsers(self.id)
|
||||
|
||||
def invite_pending_for(self, email_address):
|
||||
return email_address.lower() in (
|
||||
invited_user.email_address.lower()
|
||||
for invited_user in self.invited_users
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def active_users(self):
|
||||
return Users(self.id)
|
||||
|
||||
Reference in New Issue
Block a user