Skip to content

Commit cc9dfaf

Browse files
committed
italy_yaml fix loading datetimes
parse_datetime is already called in make_group, so we mustn't use it with main_group options. (otherwise we will call parse_datetime or make_timedelta twice, which is incorrect. this caused me a very infuriating debug session because i thought my fix for #1565 was somehow buggy.)
1 parent c76c40d commit cc9dfaf

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎cmscontrib/loaders/italy_yaml.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ def get_contest(self):
230230

231231
# Times
232232
main_group = {}
233-
load(conf, main_group, ["start", "inizio"], conv=parse_datetime)
234-
load(conf, main_group, ["stop", "fine"], conv=parse_datetime)
233+
load(conf, main_group, ["start", "inizio"])
234+
load(conf, main_group, ["stop", "fine"])
235235
load(conf, args, ["timezone"])
236-
load(conf, main_group, ["per_user_time"], conv=make_timedelta)
236+
load(conf, main_group, ["per_user_time"])
237237

238238
# Limits
239239
load(conf, args, "max_submission_number")
@@ -243,8 +243,8 @@ def get_contest(self):
243243

244244
# Analysis mode
245245
load(conf, main_group, "analysis_enabled")
246-
load(conf, main_group, "analysis_start", conv=parse_datetime)
247-
load(conf, main_group, "analysis_stop", conv=parse_datetime)
246+
load(conf, main_group, "analysis_start")
247+
load(conf, main_group, "analysis_stop")
248248

249249
# Groups
250250
main_group_name: str | None = load(conf, None, "main_group")

0 commit comments

Comments
 (0)