Skip to content

Commit

Permalink
Fix project invite timeout (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar authored Feb 23, 2023
1 parent 13bb608 commit a82999b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rdmo/projects/models/invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ def get_absolute_url(self):

@property
def is_expired(self):
if settings.PROJECT_INVITE_TIMEOUT is None:
return False
else:
if settings.PROJECT_INVITE_TIMEOUT:
return (now() - self.timestamp).total_seconds() > settings.PROJECT_INVITE_TIMEOUT
else:
return False

def make_token(self):
self.token = salted_hmac(self.key_salt, self._make_hash_value()).hexdigest()[::2]
Expand Down

0 comments on commit a82999b

Please sign in to comment.