Fix #65 :
All checks were successful
Run tests / Execute tox to run the test suite (push) Successful in 3m29s

dav_events.views.events.EventRegistrationsView._close_registration()
sends a signal now.
This commit is contained in:
2024-09-17 15:07:31 +02:00
parent 7b6e29ba92
commit 39440a695e
6 changed files with 27 additions and 9 deletions

View File

@@ -436,6 +436,20 @@ class BasicWorkflow(object):
email = emails.EventCanceledMail(recipient=recipient, event=event, editor=updater)
email.send()
def send_emails_on_registration_closed(self, updater):
event = self._event
app_config = apps.get_containing_app_config(__package__)
if not app_config.settings.enable_email_on_registration_closed:
return
recipients = get_users_by_role('publisher_web')
recipients += get_users_by_role('publisher_facebook')
for recipient in recipients:
if recipient.email:
email = emails.EventRegistrationClosedMail(recipient=recipient, event=event, editor=updater)
email.send()
#
# Permissions
#