Skip to content

Commit

Permalink
Merge branch 'master' into is4604/api-server-review
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov authored Aug 23, 2023
2 parents 01fe77f + 08e7c25 commit 38959d5
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def ensure_utc(cls, v: datetime.datetime | None) -> datetime.datetime | None:
v = v.replace(tzinfo=datetime.timezone.utc)
return v

@validator("metadata", pre=True)
@classmethod
def convert_null_to_empty_metadata(cls, v):
if v is None:
v = RunMetadataDict()
return v

class Config:
orm_mode = True
schema_extra: ClassVar[dict[str, Any]] = {
Expand Down

0 comments on commit 38959d5

Please sign in to comment.