diff options
author | Magnus Hagander | 2022-03-18 16:59:45 +0000 |
---|---|---|
committer | Magnus Hagander | 2022-03-18 16:59:45 +0000 |
commit | 1be579ec6829341c224a0b4d9fde4db5d93cbe25 (patch) | |
tree | e2bdfba49d62b2048f4980c258fb3ee2bc11e83e /postgresqleu/confreg/invoicehandler.py | |
parent | 881e1b363e6d4c20611590154671b4206b878334 (diff) |
Send notification when invoice expires for waitlisted registration
The effect is the same as when the waitlist entry expires, which does
send a notification, so make sure we send a notification in both cases.
Diffstat (limited to 'postgresqleu/confreg/invoicehandler.py')
-rw-r--r-- | postgresqleu/confreg/invoicehandler.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/postgresqleu/confreg/invoicehandler.py b/postgresqleu/confreg/invoicehandler.py index 95bda847..c5538a9d 100644 --- a/postgresqleu/confreg/invoicehandler.py +++ b/postgresqleu/confreg/invoicehandler.py @@ -4,7 +4,7 @@ from django.conf import settings from .models import ConferenceRegistration, BulkPayment, PendingAdditionalOrder from .models import RegistrationWaitlistHistory, PrepaidVoucher from .util import notify_reg_confirmed, expire_additional_options -from .util import send_conference_mail +from .util import send_conference_mail, send_conference_notification from .util import reglog @@ -71,6 +71,12 @@ class InvoiceProcessor(object): wl.enteredon = timezone.now() wl.save() + send_conference_notification( + reg.conference, + 'Waitlist invoice canceled', + 'Invoice for user {0} {1} <{2}> was canceled, and the offer has expired.'.format(reg.firstname, reg.lastname, reg.email), + ) + # If the registration was attached to a discount code, remove it so that it is no # longer counted against it. Also clear out the field, in case others want to use # that discount code. |