Skip to content

Commit

Permalink
fix that people signup up via email that get put on the waiting list …
Browse files Browse the repository at this point in the history
…not recieving a email.
  • Loading branch information
clemens committed Nov 14, 2024
1 parent a54cf26 commit 1ac9bbb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions amivapi/events/email_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from amivapi.events.queue import update_waiting_list
from amivapi.events.utils import get_token_secret
from amivapi.events.emails import notify_signup_accepted

email_blueprint = Blueprint('emails', __name__)

Expand Down Expand Up @@ -53,6 +54,12 @@ def on_confirm_email(token):

update_waiting_list(signup['event'])

# refresh the signup to get the updated data
signup = current_app.data.find_one('eventsignups', None, **lookup)
if signup.get["accepted"]==False:
# if the user is on the waitinglist he doesn't get notified automatically.
notify_signup_accepted(signup['event'], signup,True)

redirect_url = current_app.config.get('EMAIL_CONFIRMED_REDIRECT')
if redirect_url:
return redirect(redirect_url)
Expand Down

0 comments on commit 1ac9bbb

Please sign in to comment.