@@ -57,7 +57,7 @@ def __init__(self, event):
5757 subject = 'Claim your {} badges with your MAGFest Season Pass' .format (event .name ),
5858 ident = 'magprime_season_supporter_{}_invite' .format (event .slug ),
5959 template = 'season_supporter_event_invite.txt' ,
60- when = before (event .deadline ),
60+ when = [ before (event .deadline )] ,
6161 extra_data = {'event' : event })
6262
6363 for _event in SeasonEvent .instances .values ():
@@ -68,15 +68,15 @@ def __init__(self, event):
6868 Attendee , 'MAGFest schedule, map, and other FAQs' , 'precon_faqs.html' ,
6969 filter = lambda a : not a .cannot_check_in_reason ,
7070 ident = 'magprime_precon_faqs' ,
71- when = days_before (7 , c .EPOCH ),
71+ when = [ days_before (7 , c .EPOCH )] ,
7272 sender = 'MAGFest <contact@magfest.org>' )
7373
7474AutomatedEmailFixture (
7575 Attendee , 'Thank you for your Super MAGFest Superstars Donation!' ,
7676 'superstar_intro.html' ,
7777 filter = lambda a : a .extra_donation >= c .SUPERSTAR_MINIMUM and a .active_receipt and not a .amount_unpaid ,
7878 ident = 'superstar_intro' ,
79- when = before (c .SUPERSTAR_DEADLINE ),
79+ when = [ before (c .SUPERSTAR_DEADLINE )] ,
8080 sender = 'MAGFest Superstar Program <superstars@magfest.org>'
8181)
8282
@@ -96,14 +96,14 @@ def __init__(self, event):
9696 Attendee , 'Department Heads' , 'food/department_heads.txt' ,
9797 lambda a : a .is_dept_head ,
9898 ident = 'magprime_department_water_and_food_info' ,
99- # when=days_before(7, c.UBER_TAKEDOWN),
99+ # when=[ days_before(7, c.UBER_TAKEDOWN)] ,
100100 sender = 'MAGFest Staff Suite <chefs@magfest.org>' )
101101
102102AutomatedEmailFixture (
103103 Attendee , 'MAGFest Volunteer Food' , 'volunteer_food_info.txt' ,
104104 lambda a : a .staffing ,
105105 ident = 'magprime_volunteer_food_info' ,
106- when = days_before (7 , c .UBER_TAKEDOWN ),
106+ when = [ days_before (7 , c .UBER_TAKEDOWN )] ,
107107 sender = 'MAGFest Staff Suite <chefs@magfest.org>' )
108108
109109AutomatedEmailFixture (
@@ -119,67 +119,14 @@ def __init__(self, event):
119119 needs_approval = True ,
120120 sender = 'MAGFest LAN <lan@magfest.org>' )
121121
122- MarketplaceEmailFixture (
123- 'Your {} {} has been waitlisted' .format (c .EVENT_NAME , c .DEALER_APP_TERM .capitalize ()),
124- 'dealers/waitlisted.txt' ,
125- lambda g : g .status == c .WAITLISTED ,
126- # query=Group.status == c.WAITLISTED,
127- needs_approval = True ,
128- ident = 'dealer_reg_waitlisted' )
129-
130- MarketplaceEmailFixture (
131- 'Your {} {} has been declined' .format (c .EVENT_NAME , c .DEALER_APP_TERM .capitalize ()),
132- 'dealers/declined.txt' ,
133- lambda g : g .status == c .DECLINED ,
134- # query=Group.status == c.DECLINED,
135- needs_approval = True ,
136- ident = 'dealer_reg_declined' )
137-
138- """
139- AutomatedEmailFixture(
140- Attendee, 'MAGFest Tech Ops volunteering', 'techops.txt',
141- lambda a: a.staffing and a.assigned_to(c.TECH_OPS),
142- ident='magprime_techops_volunteer',
143- sender='MAGFest TechOps <techops@magfest.org>')
144-
145- AutomatedEmailFixture(
146- Attendee, 'MAGFest Chipspace volunteering', 'chipspace.txt',
147- lambda a: a.staffing and a.assigned_to(c.CHIPSPACE),
148- ident='magprime_chipspace_volunteer',
149- sender='MAGFest ChipSpace <chipspace@magfest.org>')
150-
151- AutomatedEmailFixture(
152- Attendee, 'MAGFest Chipspace shifts', 'chipspace_trusted.txt',
153- lambda a: a.staffing and a.has_shifts_in(c.CHIPSPACE) and a.trusted_in(c.CHIPSPACE),
154- ident='magprime_chipspace_trusted_volunteer',
155- sender='MAGFest ChipSpace <chipspace@magfest.org>')
156-
157- AutomatedEmailFixture(
158- Attendee, 'MAGFest Chipspace', 'chipspace_untrusted.txt',
159- lambda a: a.staffing and a.has_shifts_in(c.CHIPSPACE) and not a.trusted_in(c.CHIPSPACE),
160- ident='magprime_chipspace_untrusted_volunteer',
161- sender='MAGFest ChipSpace <chipspace@magfest.org>')
162-
163- AutomatedEmailFixture(
164- Attendee, 'Want to help run MAGFest poker tournaments?', 'poker.txt',
165- lambda a: a.has_shifts_in(c.TABLETOP),
166- ident='magprime_tabletop_volunteer_poker_inquiry',
167- sender='MAGFest Tabletop <tabletop@magfest.org>')
168-
169122StopsEmailFixture (
170- 'MAGFest Staff Support', 'staff_support.txt',
171- lambda a: a.assigned_to(c.STAFF_SUPPORT) and not a.trusted_in(c.STAFF_SUPPORT),
172- ident='magprime_staff_support_volunteer')
173- """
174-
175- StopsEmailFixture (
176- '{EVENT_NAME} ({EVENT_DATE}) shifts are live tomorrow!' ,
123+ f'{ c .EVENT_NAME } ({ c .EPOCH .strftime ('%b %Y' )} ) shifts are live tomorrow!' ,
177124 'shifts/shifts_created.txt' ,
178125 lambda a : (
179126 a .badge_type != c .CONTRACTOR_BADGE
180127 and a .takes_shifts
181128 and a .registered_local <= c .SHIFTS_CREATED ),
182- when = before (c .PREREG_TAKEDOWN ),
129+ when = [ before (c .PREREG_TAKEDOWN )] ,
183130 ident = 'volunteer_shift_signup_notification' )
184131
185132StopsEmailFixture (
@@ -192,11 +139,11 @@ def __init__(self, event):
192139 StopsEmailFixture (
193140 'Last Chance to enter your MAGFest staff shirt preferences' , 'second_shirt.html' ,
194141 lambda a : a .gets_staff_shirt and not a .shirt_info_marked ,
195- when = days_before (21 , c .SHIRT_DEADLINE ),
142+ when = [ days_before (21 , c .SHIRT_DEADLINE )] ,
196143 ident = 'magprime_second_shirt' )
197144
198145AutomatedEmailFixture (
199- Attendee , 'Last Chance for MAGFest ' + c .EVENT_YEAR + ' bonus swag!' , 'attendee_swag_promo.html' ,
146+ Attendee , f 'Last Chance for MAGFest { c .EVENT_YEAR } bonus swag!' , 'attendee_swag_promo.html' ,
200147 lambda a : (
201148 a .can_spam
202149 and (a .paid == c .HAS_PAID or a .paid == c .NEED_NOT_PAY or (a .group and a .group .amount_paid ))
@@ -208,9 +155,8 @@ def __init__(self, event):
208155# who kicked in at the shirt level or above). Should not be sent after the t-shirt
209156# size deadline.
210157AutomatedEmailFixture (
211- Attendee , 'MAGFest ' + c .EVENT_YEAR + ' t-shirt size confirmation' , 'confirm_shirt_size.html' ,
158+ Attendee , f 'MAGFest { c .EVENT_YEAR } t-shirt size confirmation' , 'confirm_shirt_size.html' ,
212159 lambda a : days_after (3 , a .registered )() and a .gets_any_kind_of_shirt ,
213- when = before (c .SHIRT_DEADLINE ),
160+ when = [ before (c .SHIRT_DEADLINE )] ,
214161 sender = 'MAGFest Merch Team <merch@magfest.org>' ,
215162 ident = 'magprime_shirt_size_confirmation' )
216-
0 commit comments