Merge "Fix setup_election_config for combined election events"
This commit is contained in:
commit
474001d298
@ -194,13 +194,11 @@ def main():
|
||||
end = end.replace(hour=23, minute=45)
|
||||
events = []
|
||||
for event in params['events']:
|
||||
e_types = [args.type]
|
||||
if args.type == 'combined':
|
||||
e_types = ['PTL', 'TC']
|
||||
if event == 'Campaigning':
|
||||
name = 'TC %s' % event
|
||||
else:
|
||||
name = 'TC & PTL %s' % event
|
||||
else:
|
||||
name = '%s %s' % (args.type, event)
|
||||
e_types = ['TC']
|
||||
start = end - TWO_WEEK
|
||||
# For a TC or combined election we want the email deadline to match the
|
||||
# beginning of the Campaigning period, which gives the officials time
|
||||
@ -218,6 +216,8 @@ def main():
|
||||
if event == 'Election':
|
||||
schedule = utils.get_schedule_data(names[idx+1])
|
||||
validate_tc_charter(args.type, schedule, start, end)
|
||||
for e_type in e_types:
|
||||
name = '%s %s' % (e_type, event)
|
||||
events.insert(0, OrderedDict(name=name,
|
||||
start=iso_fmt(start),
|
||||
end=iso_fmt(end)))
|
||||
|
Loading…
Reference in New Issue
Block a user