Skip to content

Commit

Permalink
Lower case emails
Browse files Browse the repository at this point in the history
  • Loading branch information
nmenezes0 committed Aug 13, 2024
1 parent f43036d commit dcb54d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consultation_analyser/consultations/views/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

def send_magic_link_if_email_exists(request: HttpRequest, email: str) -> None:
try:
email = email.lower()
user = User.objects.get(email=email)
link = MagicLink.objects.create(user=user, redirect_to="/")
magic_link = request.build_absolute_uri(link.get_absolute_url())
Expand All @@ -36,7 +37,6 @@ def new(request: HttpRequest):
form = NewSessionForm(request.POST)
if form.is_valid():
email = form.cleaned_data["email"]
email = email.lower()
send_magic_link_if_email_exists(request, email)
return render(request, "magic_link/link_sent.html")

Expand Down

0 comments on commit dcb54d8

Please sign in to comment.