Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the generic placeholder email for attendees #4375

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions uber/automated_emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,13 +524,12 @@ def staff_import_placeholder(a): return a.placeholder and (a.registered_local <=
"staff import".lower() in a.admin_notes.lower()))


def volunteer_placeholder(a): return a.placeholder and a.registered_local > c.PREREG_OPEN
# a.staffing provided by StopsEmailFixture
def volunteer_placeholder(a): return a.staffing and a.placeholder and a.registered_local > c.PREREG_OPEN


# TODO: Add an email for MIVS judges, an email for non-Guest or Band guest group badges,
# and an email for group-leader-created badges
def generic_placeholder(a): return a.placeholder and (c.AT_THE_CON or not deferred_attendee_placeholder
def generic_placeholder(a): return a.placeholder and (not deferred_attendee_placeholder(a)
and not panelist_placeholder(a) and not guest_placeholder(a)
and not band_placeholder(a) and not dealer_placeholder(a)
and not staff_import_placeholder(a)
Expand Down Expand Up @@ -561,7 +560,7 @@ def generic_placeholder(a): return a.placeholder and (c.AT_THE_CON or not deferr
Attendee,
'Claim your deferred badge for {EVENT_NAME} {EVENT_YEAR}!',
'placeholders/deferred.html',
deferred_attendee_placeholder,
deferred_attendee_placeholder,
when=after(c.PREREG_OPEN),
ident='claim_deferred_badge')

Expand Down Expand Up @@ -613,7 +612,7 @@ def generic_placeholder(a): return a.placeholder and (c.AT_THE_CON or not deferr
StopsEmailFixture(
'Claim your Volunteer badge for {EVENT_NAME} {EVENT_YEAR}',
'placeholders/volunteer.txt',
lambda a: volunteer_placeholder(a),
volunteer_placeholder,
ident='volunteer_badge_confirmation')

AutomatedEmailFixture(
Expand Down
2 changes: 1 addition & 1 deletion uber/tasks/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def notify_admins_of_pending_emails():
'pending_emails_by_sender': emails_by_sender,
'primary_sender': sender,
}, encoding=None)
send_email(c.STAFF_EMAIL, sender, subject, body, format='html', model='n/a', session=session)
send_email(c.REPORTS_EMAIL, sender, subject, body, format='html', model='n/a', session=session)

return groupify(pending_emails, 'sender', 'ident')

Expand Down
Loading