mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
fix typing
This commit is contained in:
parent
200ddfd16e
commit
e51706d868
@ -1330,9 +1330,8 @@ class FrigateConfig(FrigateBaseModel):
|
|||||||
|
|
||||||
for key, detector in config.detectors.items():
|
for key, detector in config.detectors.items():
|
||||||
adapter = TypeAdapter(DetectorConfig)
|
adapter = TypeAdapter(DetectorConfig)
|
||||||
detector_config: DetectorConfig = adapter.validate_python(
|
model_dict = detector if isinstance(detector, dict) else detector.model_dump()
|
||||||
detector.model_dump()
|
detector_config: DetectorConfig = adapter.validate_python(model_dict)
|
||||||
)
|
|
||||||
if detector_config.model is None:
|
if detector_config.model is None:
|
||||||
detector_config.model = config.model
|
detector_config.model = config.model
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user