Skip to content

Commit

Permalink
Fix decoding test failure for Scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
nathro committed Jun 23, 2022
1 parent 418b229 commit dd45317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/autotransform/util/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ def from_data(data: Dict[str, Any]) -> SchemaScheduleSettings:
"""

repeats = RepeatSetting(data["repeats"])
hour_of_day = data["hour_of_day"]
hour_of_day = data.get("hour_of_day", 0)
assert isinstance(hour_of_day, int)
assert hour_of_day in range(24)
day_of_week = data.get("day_of_week", None)
day_of_week = data.get("day_of_week", 0)
if day_of_week is not None:
assert isinstance(day_of_week, int)
assert day_of_week in range(7)
Expand Down

0 comments on commit dd45317

Please sign in to comment.