Skip to content

Commit 0772aa0

Browse files
authored
Merge pull request #320 from Res260/issue319
Do not serialize TestApp.hardcoded_path if it has value None. Fixes #…
2 parents 7f5319e + ea34bb1 commit 0772aa0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contentctl/objects/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class TestApp(App_Base):
6565
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.")
6666

6767

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

0 commit comments

Comments
 (0)