Skip to content

Commit

Permalink
Do not serialize TestApp.hardcoded_path if it has value None. Fixes s…
Browse files Browse the repository at this point in the history
  • Loading branch information
Res260 committed Oct 24, 2024
1 parent f9bcd7e commit ea34bb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contentctl/objects/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class TestApp(App_Base):
hardcoded_path: Optional[Union[FilePath,HttpUrl]] = Field(default=None, description="This may be a relative or absolute link to a file OR an HTTP URL linking to your app.")


@field_serializer('hardcoded_path',when_used='always')
@field_serializer('hardcoded_path',when_used='unless-none')
def serialize_path(path: Union[AnyUrl, pathlib.Path])->str:
return str(path)

Expand Down

0 comments on commit ea34bb1

Please sign in to comment.