Resend workspace invitations to email submitted in new member form.
This commit is contained in:
@@ -42,11 +42,13 @@ class Invitation(Base, TimestampsMixin, AuditableMixin):
|
||||
|
||||
expiration_time = Column(TIMESTAMP(timezone=True))
|
||||
|
||||
token = Column(String(), index=True, default=lambda: secrets.token_urlsafe())
|
||||
token = Column(String, index=True, default=lambda: secrets.token_urlsafe())
|
||||
|
||||
email = Column(String, nullable=False)
|
||||
|
||||
def __repr__(self):
|
||||
return "<Invitation(user='{}', workspace_role='{}', id='{}')>".format(
|
||||
self.user_id, self.workspace_role_id, self.id
|
||||
return "<Invitation(user='{}', workspace_role='{}', id='{}', email='{}')>".format(
|
||||
self.user_id, self.workspace_role_id, self.id, self.email
|
||||
)
|
||||
|
||||
@property
|
||||
@@ -82,10 +84,6 @@ class Invitation(Base, TimestampsMixin, AuditableMixin):
|
||||
if self.workspace_role:
|
||||
return self.workspace_role.workspace
|
||||
|
||||
@property
|
||||
def user_email(self):
|
||||
return self.workspace_role.user.email
|
||||
|
||||
@property
|
||||
def user_name(self):
|
||||
return self.workspace_role.user.full_name
|
||||
|
||||
Reference in New Issue
Block a user