Skip to content

Commit

Permalink
[Schedule] Update type hints for ScheduleCronTrigger to avoid unexpec…
Browse files Browse the repository at this point in the history
…ted pydantic behaviour (mlrun#3286)
  • Loading branch information
Eyal-Danieli committed Mar 22, 2023
1 parent 98f4370 commit ca265e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlrun/api/schemas/schedule.py
Expand Up @@ -36,8 +36,8 @@ class ScheduleCronTrigger(BaseModel):
hour: Optional[Union[int, str]]
minute: Optional[Union[int, str]]
second: Optional[Union[int, str]]
start_date: Optional[Union[datetime, str]]
end_date: Optional[Union[datetime, str]]
start_date: Union[datetime, str] = None
end_date: Union[datetime, str] = None

# APScheduler also supports datetime.tzinfo type, but Pydantic doesn't - so we don't
timezone: Optional[str]
Expand Down

0 comments on commit ca265e6

Please sign in to comment.