mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-28 06:58:30 +03:00
add object type filter to endpoint
This commit is contained in:
parent
0391843749
commit
3820c511d9
@ -640,10 +640,8 @@ def get_custom_attributes(request: Request, object_type: str = None):
|
|||||||
):
|
):
|
||||||
# If object_type is specified, check if this model applies to that object type
|
# If object_type is specified, check if this model applies to that object type
|
||||||
if object_type is not None:
|
if object_type is not None:
|
||||||
if (
|
model_objects = getattr(model_config.object_config, "objects", []) or []
|
||||||
not hasattr(model_config.object_config, "objects")
|
if object_type not in model_objects:
|
||||||
or object_type not in model_config.object_config.objects
|
|
||||||
):
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
dataset_dir = os.path.join(CLIPS_DIR, sanitize_filename(name), "dataset")
|
dataset_dir = os.path.join(CLIPS_DIR, sanitize_filename(name), "dataset")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user