mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Mask/zone editor fixes (#22732)
* add guards to reject missing sub commands * mask/zone bugfixes - fix websocket crash when creating a new mask or zone before a name is assigned - fix deleted masks and zones not disappearing from the list until navigating away - fix deleting profile override not reverting to the base mask in the list - fix inertia defaulting to nan * disable save button on invalid form state * fix validation for speed estimation * ensure polygon is closed before allowing save * require all masks and zones to be on the base config * clarify dialog message and tooltip when removing an override * clarify docs
This commit is contained in:
@@ -1224,6 +1224,15 @@ def camera_set(
|
||||
status_code=400,
|
||||
)
|
||||
|
||||
if not sub_command and feature in _SUB_COMMAND_FEATURES:
|
||||
return JSONResponse(
|
||||
content={
|
||||
"success": False,
|
||||
"message": f"Feature '{feature}' requires a sub-command (e.g. mask or zone name)",
|
||||
},
|
||||
status_code=400,
|
||||
)
|
||||
|
||||
if camera_name == "*":
|
||||
cameras = list(frigate_config.cameras.keys())
|
||||
elif camera_name not in frigate_config.cameras:
|
||||
|
||||
Reference in New Issue
Block a user