diff options
author | Magnus Hagander | 2020-03-23 17:24:21 +0000 |
---|---|---|
committer | Magnus Hagander | 2020-03-23 17:24:21 +0000 |
commit | 5346c292ebcb1f6b3f81a43f5ed81eab64879f1e (patch) | |
tree | bbec8f4b6eb4df92e6a084bc4695e5f4aaea6f64 /postgresqleu/confreg/util.py | |
parent | 011431753377c4c5f2b0c8e0c3edfb1b7c60f538 (diff) |
Don't send removal notices to regs added by third parties
If a registration was never confirmed, the attendee may not know they
were ever added (because someone may have just done it in error), and
would thus just get confused by the message, so don't send it.
If the attendee added themselves, then keep sending the notifications of
course, and likewise if they were ever confirmed.
Diffstat (limited to 'postgresqleu/confreg/util.py')
-rw-r--r-- | postgresqleu/confreg/util.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/postgresqleu/confreg/util.py b/postgresqleu/confreg/util.py index 822b2657..93a2e2dd 100644 --- a/postgresqleu/confreg/util.py +++ b/postgresqleu/confreg/util.py @@ -262,8 +262,10 @@ def cancel_registration(reg, is_unconfirmed=False, reason=None, user=None): if not is_unconfirmed: raise Exception("Registration not paid, data is out of sync!") - # If we sent a welcome mail, also send a goodbye mail - if reg.conference.sendwelcomemail: + # If we sent a welcome mail, also send a goodbye mail. Except when this is an + # unfinished part of a multiregistration, in which case it would probably just + # be confusing to the user. + if reg.conference.sendwelcomemail and not (reg.attendee != reg.registrator and not reg.payconfirmedat): send_conference_mail(reg.conference, reg.email, "Registration canceled", |