Skip to content

Commit

Permalink
config validation fixes (blakeblackshear#11191)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye217 committed May 1, 2024
1 parent 6d2457e commit 499f70c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions frigate/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ class ZoneConfig(BaseModel):
ge=0,
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,
title="List of objects that can trigger the zone.",
)
Expand Down Expand Up @@ -616,7 +616,7 @@ class AlertsConfig(FrigateBaseModel):
labels: List[str] = Field(
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,
title="List of required zones to be entered in order to save the event as an alert.",
)
Expand All @@ -636,7 +636,7 @@ class DetectionsConfig(FrigateBaseModel):
labels: Optional[List[str]] = Field(
default=None, title="Labels to create detections for."
)
required_zones: List[str] = Field(
required_zones: Union[str, List[str]] = Field(
default_factory=list,
title="List of required zones to be entered in order to save the event as a detection.",
)
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/filter/CameraGroupSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export function CameraGroupEdit({
? currentGroups.length + 1
: 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 cameraQueries = values.cameras
.map((cam) => `&camera_groups.${values.name}.cameras=${cam}`)
Expand Down

0 comments on commit 499f70c

Please sign in to comment.