From 5d25b251875c7b0ab9dbc686df7e7ec23f4c82ea Mon Sep 17 00:00:00 2001 From: Phin Wolkwitz Date: Fri, 7 Aug 2026 13:17:57 +0200 Subject: [PATCH] Apply suggestions, remove superfluous comments and add a check Co-authored-by: Richard Schreiber --- src/pretix/plugins/sendmail/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pretix/plugins/sendmail/models.py b/src/pretix/plugins/sendmail/models.py index 7f979e94a3..d23c5fb0a8 100644 --- a/src/pretix/plugins/sendmail/models.py +++ b/src/pretix/plugins/sendmail/models.py @@ -203,9 +203,10 @@ class ScheduledMail(models.Model): if p.id in position_ids: mail_to_parent = False - # position is an add-on - if p.addon_to_id is not None: - # without attendee-email + if p.addon_to_id: + if not parent_op or parent_op.id != p.addon_to_id: + # something mixed up with this order as addons should always come after their parent-position + continue if not p.attendee_email: if p.addon_to_id in sent_to_positions: continue