diff --git a/shiftregister/app/views.py b/shiftregister/app/views.py index ec9415d..ffb5af8 100644 --- a/shiftregister/app/views.py +++ b/shiftregister/app/views.py @@ -9,6 +9,9 @@ from django.conf import settings from django.contrib import messages import datetime from .decorators import event_state +from dynamic_preferences.registries import global_preferences_registry + +global_preferences = global_preferences_registry.manager() @event_state @@ -86,7 +89,9 @@ def logout(request): def register(request): - # handle number already being registered(resend message?) + if global_preferences["helper__event_state"] == "AFTER": + return render(request, "event_after.html", {}) + if request.helper: if request.session.get("last_seen_shift"): return redirect("shift", shiftid=request.session["last_seen_shift"])