mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-07 14:05:28 +03:00
formatting
This commit is contained in:
parent
edfc73f0b8
commit
f11f57574b
@ -499,9 +499,7 @@ def config_save(save_option: str, body: Any = Body(media_type="text/plain")):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _restore_masked_camera_paths(
|
def _restore_masked_camera_paths(config_data: dict, config: FrigateConfig) -> None:
|
||||||
config_data: dict, config: FrigateConfig
|
|
||||||
) -> None:
|
|
||||||
"""Substitute incoming `*:*` masked credentials with the in-memory ones.
|
"""Substitute incoming `*:*` masked credentials with the in-memory ones.
|
||||||
|
|
||||||
The /config response masks ffmpeg input credentials, so the settings UI
|
The /config response masks ffmpeg input credentials, so the settings UI
|
||||||
@ -545,9 +543,7 @@ def _config_set_in_memory(request: Request, body: AppConfigSetBody) -> JSONRespo
|
|||||||
try:
|
try:
|
||||||
updates = {}
|
updates = {}
|
||||||
if body.config_data:
|
if body.config_data:
|
||||||
_restore_masked_camera_paths(
|
_restore_masked_camera_paths(body.config_data, request.app.frigate_config)
|
||||||
body.config_data, request.app.frigate_config
|
|
||||||
)
|
|
||||||
updates = flatten_config_data(body.config_data)
|
updates = flatten_config_data(body.config_data)
|
||||||
updates = {k: ("" if v is None else v) for k, v in updates.items()}
|
updates = {k: ("" if v is None else v) for k, v in updates.items()}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user