Skip to content

Commit de8b12c

Browse files
committed
fixed docstring and changed to model dump
1 parent 4297b71 commit de8b12c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

RATapi/controls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ def save(self, path: Union[str, Path], filename: str = "controls"):
230230
----------
231231
path : str or Path
232232
The directory in which the controls object will be written.
233+
filename : str
234+
The name for the JSON file containing the controls object.
233235
234236
"""
235237
file = Path(path, f"{filename.removesuffix('.json')}.json")

RATapi/project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ def make_custom_file_dict(item):
875875
json_dict["custom_files"] = [make_custom_file_dict(file) for file in attr]
876876

877877
elif isinstance(attr, ClassList):
878-
json_dict[field] = [dict(item) for item in attr]
878+
json_dict[field] = [item.model_dump() for item in attr]
879879
else:
880880
json_dict[field] = attr
881881

0 commit comments

Comments
 (0)