From c126237611aa42f2870f37dc566f551649a57e1f Mon Sep 17 00:00:00 2001 From: Eugene Molotov Date: Thu, 26 Dec 2024 10:49:39 +0500 Subject: [PATCH] =?UTF-8?q?[FIX]=20website=5Fevent=5Fattendee=5Ffields:=20?= =?UTF-8?q?=D0=BD=D0=BE=D1=80=D0=BC=D0=B0=D0=BB=D0=B8=D0=B7=D1=83=D0=B5?= =?UTF-8?q?=D0=BC=20=D0=BF=D0=BE=D1=87=D1=82=D1=83=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=BE?= =?UTF-8?q?=D0=B9=20=D0=BE=20=D0=BD=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D0=B8=20?= =?UTF-8?q?=D1=80=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website_event_attendee_fields/controllers/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website_event_attendee_fields/controllers/main.py b/website_event_attendee_fields/controllers/main.py index b81760c..6f8f77c 100644 --- a/website_event_attendee_fields/controllers/main.py +++ b/website_event_attendee_fields/controllers/main.py @@ -1,8 +1,9 @@ # ruff: noqa: E501 import re -from odoo import http +from odoo import _, http from odoo.http import request +from odoo.tools.mail import email_normalize from odoo.addons.website_event.controllers.main import WebsiteEventController @@ -59,6 +60,10 @@ def check_email(self, event_id, email): return {} Partners = request.env["res.partner"].sudo() + email = email_normalize(email, True) + + if not email: + return {"email_not_allowed": _("Invalid email")} current_user = request.env.user if email == current_user.email: