summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2023-03-06 12:16:00 +0000
committerMagnus Hagander2023-03-06 12:26:20 +0000
commit66968fb8573138148713ec3dfd80558c337679fd (patch)
tree4b8f04f9b4647b0dbbadff877e5668808edd2413
parent25cb8016be858a2c4eac04e013fbef910fae0eae (diff)
Factor out send_attachment_email to separate function
-rw-r--r--postgresqleu/confreg/util.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/postgresqleu/confreg/util.py b/postgresqleu/confreg/util.py
index cd7df941..789cf213 100644
--- a/postgresqleu/confreg/util.py
+++ b/postgresqleu/confreg/util.py
@@ -211,6 +211,20 @@ def send_welcome_email(reg):
)
+def send_attachment_email(reg):
+ send_conference_mail(
+ reg.conference,
+ reg.email,
+ "Your registration",
+ 'confreg/mail/regmulti_attach.txt',
+ {
+ 'conference': reg.conference,
+ 'reg': reg,
+ },
+ receivername=reg.fullname,
+ )
+
+
def notify_reg_confirmed(reg, updatewaitlist=True):
reglog(reg, "Registration confirmed")
@@ -244,16 +258,7 @@ def notify_reg_confirmed(reg, updatewaitlist=True):
if not found:
# User not found, so we use the random token and send it
# to ask them to attach their account to this registration.
- send_conference_mail(reg.conference,
- reg.email,
- "Your registration",
- 'confreg/mail/regmulti_attach.txt',
- {
- 'conference': reg.conference,
- 'reg': reg,
- },
- receivername=reg.fullname,
- )
+ send_attachment_email(reg)
# If the registration has a user account, we may have email to connect
# to this registration.