From 3fdfbf3356a5674d520ec9eea0dadcdb29dedbd0 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 8 Nov 2023 15:34:04 +0100 Subject: [PATCH] Fix migration checks --- src/redturtle/prenotazioni/events/prenotazione.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/redturtle/prenotazioni/events/prenotazione.py b/src/redturtle/prenotazioni/events/prenotazione.py index 9596adaf..d4b19e34 100644 --- a/src/redturtle/prenotazioni/events/prenotazione.py +++ b/src/redturtle/prenotazioni/events/prenotazione.py @@ -48,6 +48,9 @@ def reallocate_container(obj): def notify_on_after_transition_event(context, event): """The messages are being send only if the following flags on the PrenotazioniFolder are set""" + if is_migration(): + return + booking_folder = context.getPrenotazioniFolder() flags = { i: getattr(booking_folder, f"notify_on_{i}", False) @@ -119,7 +122,6 @@ def get_mail_from_address(): def send_email_to_managers(booking, event): # skip email for vacation/out-of-office - if is_migration(): return