diff --git a/src/dstack/_internal/server/services/config.py b/src/dstack/_internal/server/services/config.py index 7f4d0bc37..a7d2db2c7 100644 --- a/src/dstack/_internal/server/services/config.py +++ b/src/dstack/_internal/server/services/config.py @@ -272,7 +272,7 @@ def seq_representer(dumper, sequence): yaml.add_representer(list, seq_representer) with open(settings.SERVER_CONFIG_FILE_PATH, "w+") as f: - yaml.dump(config.dict(), f, sort_keys=False) + yaml.dump(config.dict(exclude_none=True), f, sort_keys=False) server_config_manager = ServerConfigManager()