Skip to content

Commit

Permalink
fix: fixed issue causing no new tokens to be generated
Browse files Browse the repository at this point in the history
  • Loading branch information
tymees committed Sep 3, 2024
1 parent 01d19cc commit 2a05552
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions participants/utils/mailinglist_unsubscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@


def get_mailinglist_unsubscribe_token(participant: Participant) -> UserToken:
try:
token = UserToken.objects.filter(
participant=participant,
type=UserToken.MAILINGLIST_UNSUBSCRIBE
).first()
token = UserToken.objects.filter(
participant=participant,
type=UserToken.MAILINGLIST_UNSUBSCRIBE
).first()

except UserToken.DoesNotExist:
if token is None:
token = UserToken(
participant=participant,
type=UserToken.MAILINGLIST_UNSUBSCRIBE,
Expand Down

0 comments on commit 2a05552

Please sign in to comment.