Apply suggestions, remove superfluous comments and add a check

Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
This commit is contained in:
Phin Wolkwitz
2026-08-07 14:21:09 +02:00
committed by Phin Wolkwitz
co-authored by Richard Schreiber
parent e05e6d25f9
commit 5d25b25187
+4 -3
View File
@@ -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