mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
config validation fixes (#11191)
This commit is contained in:
parent
6d2457ebad
commit
499f70cfd3
@ -518,7 +518,7 @@ class ZoneConfig(BaseModel):
|
|||||||
ge=0,
|
ge=0,
|
||||||
title="Number of seconds that an object must loiter to be considered in the zone.",
|
title="Number of seconds that an object must loiter to be considered in the zone.",
|
||||||
)
|
)
|
||||||
objects: List[str] = Field(
|
objects: Union[str, List[str]] = Field(
|
||||||
default_factory=list,
|
default_factory=list,
|
||||||
title="List of objects that can trigger the zone.",
|
title="List of objects that can trigger the zone.",
|
||||||
)
|
)
|
||||||
@ -616,7 +616,7 @@ class AlertsConfig(FrigateBaseModel):
|
|||||||
labels: List[str] = Field(
|
labels: List[str] = Field(
|
||||||
default=DEFAULT_ALERT_OBJECTS, title="Labels to create alerts for."
|
default=DEFAULT_ALERT_OBJECTS, title="Labels to create alerts for."
|
||||||
)
|
)
|
||||||
required_zones: List[str] = Field(
|
required_zones: Union[str, List[str]] = Field(
|
||||||
default_factory=list,
|
default_factory=list,
|
||||||
title="List of required zones to be entered in order to save the event as an alert.",
|
title="List of required zones to be entered in order to save the event as an alert.",
|
||||||
)
|
)
|
||||||
@ -636,7 +636,7 @@ class DetectionsConfig(FrigateBaseModel):
|
|||||||
labels: Optional[List[str]] = Field(
|
labels: Optional[List[str]] = Field(
|
||||||
default=None, title="Labels to create detections for."
|
default=None, title="Labels to create detections for."
|
||||||
)
|
)
|
||||||
required_zones: List[str] = Field(
|
required_zones: Union[str, List[str]] = Field(
|
||||||
default_factory=list,
|
default_factory=list,
|
||||||
title="List of required zones to be entered in order to save the event as a detection.",
|
title="List of required zones to be entered in order to save the event as a detection.",
|
||||||
)
|
)
|
||||||
|
@ -485,7 +485,7 @@ export function CameraGroupEdit({
|
|||||||
? currentGroups.length + 1
|
? currentGroups.length + 1
|
||||||
: editingGroup[1].order;
|
: editingGroup[1].order;
|
||||||
|
|
||||||
const orderQuery = `camera_groups.${values.name}.order=${order}`;
|
const orderQuery = `camera_groups.${values.name}.order=${+order}`;
|
||||||
const iconQuery = `camera_groups.${values.name}.icon=${values.icon}`;
|
const iconQuery = `camera_groups.${values.name}.icon=${values.icon}`;
|
||||||
const cameraQueries = values.cameras
|
const cameraQueries = values.cameras
|
||||||
.map((cam) => `&camera_groups.${values.name}.cameras=${cam}`)
|
.map((cam) => `&camera_groups.${values.name}.cameras=${cam}`)
|
||||||
|
Loading…
Reference in New Issue
Block a user