From 2e0004bfcb55b49b0b1aafc6aca94b5bda409985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 7 Sep 2023 21:11:16 +0000 Subject: [PATCH] config exclude --- api/advent22_api/config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/advent22_api/config.py b/api/advent22_api/config.py index 2e6fa18..287a318 100644 --- a/api/advent22_api/config.py +++ b/api/advent22_api/config.py @@ -62,7 +62,12 @@ async def get_config() -> Config: async def set_config(cfg: Config) -> None: - txt = tomli_w.dumps(cfg.model_dump()) + txt = tomli_w.dumps( + cfg.model_dump( + exclude_defaults=True, + exclude_unset=True, + ) + ) await dav_write_textfile_content( path=SETTINGS.config_filename,