Skip to content

Commit

Permalink
write_traffic_situation_to_file.py: exclude fields the value of which…
Browse files Browse the repository at this point in the history
… is either None or has not been actively set after instantiation.
  • Loading branch information
ClaasRostock committed Nov 25, 2023
1 parent edd9e7c commit e0e7793
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trafficgen/write_traffic_situation_to_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def write_traffic_situations_to_json_file(situations: List[Situation], write_fol
output_file_path: Path = write_folder / f"traffic_situation_{file_number:02d}.json"
data: str = situation.model_dump_json(
indent=4,
exclude_defaults=True,
exclude_unset=True,
exclude_defaults=False,
exclude_none=True,
)
with open(output_file_path, "w", encoding="utf-8") as outfile:
Expand Down

0 comments on commit e0e7793

Please sign in to comment.