refactor: clean the search command a bit

This commit is contained in:
cătălin 2023-07-23 17:40:03 +02:00
commit 701d79583d
Signed by: catalin
GPG key ID: 0178DF42F43E5FD2
4 changed files with 93 additions and 141 deletions

View file

@ -76,7 +76,7 @@ def settings_file_path(halig_path: Path, notebooks_path: Path) -> Path:
yaml_file.touch()
s = Settings(notebooks_root_path=notebooks_path)
# `.dict()` doesn't serialize some fields that yaml doesn't understand
serialized = json.loads(s.json())
serialized = json.loads(s.model_dump_json())
with yaml_file.open("w") as f:
yaml.safe_dump(serialized, f)
return yaml_file