Skip to content

Commit

Permalink
Merge pull request #4375 from magfest/fix-generic-placeholder-again
Browse files Browse the repository at this point in the history
Fix the generic placeholder email for attendees
  • Loading branch information
kitsuta committed May 27, 2024
2 parents fa73b1a + cf3eed8 commit 49c940e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
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

0 comments on commit 49c940e

Please sign in to comment.