Include DB in safe mode config

Copy DB when going into safe mode to avoid creating a new one if a user has configured a separate location
This commit is contained in:
Nicolas Mowen
2025-11-21 06:26:10 -07:00
parent 8e8346099e
commit 2d3d9080c3
+4
View File
@@ -792,6 +792,10 @@ class FrigateConfig(FrigateBaseModel):
# copy over auth and proxy config in case auth needs to be enforced
safe_config["auth"] = config.get("auth", {})
safe_config["proxy"] = config.get("proxy", {})
# copy over database config for auth and so a new db is not created
safe_config["database"] = config.get("database", {})
return cls.parse_object(safe_config, **context)
# Validate and return the config dict.