From ecfa0608772bf927779151ddb7494c1e0b162d6b Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 6 Dec 2024 18:46:20 -0700 Subject: [PATCH] API response cleanup --- frigate/api/defs/response/event_response.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frigate/api/defs/response/event_response.py b/frigate/api/defs/response/event_response.py index 75cf670dc4..66738d3cf9 100644 --- a/frigate/api/defs/response/event_response.py +++ b/frigate/api/defs/response/event_response.py @@ -1,6 +1,6 @@ from typing import Any, Optional -from pydantic import BaseModel +from pydantic import BaseModel, ConfigDict class EventResponse(BaseModel): @@ -10,7 +10,7 @@ class EventResponse(BaseModel): camera: str start_time: float end_time: Optional[float] - false_positive: bool + false_positive: Optional[bool] zones: list[str] thumbnail: str has_clip: bool @@ -22,6 +22,8 @@ class EventResponse(BaseModel): model_type: Optional[str] data: dict[str, Any] + model_config = ConfigDict(extra="forbid", protected_namespaces=()) + class EventCreateResponse(BaseModel): success: bool