Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not serialize TestApp.hardcoded_path if it has value None. Fixes #319
.
  • Loading branch information
Res260 committed Oct 24, 2024
commit ea34bb1459bf249d1d68cd879b293a2cfae3d1be
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
Loading