From 327ed3e0f113728155a05b0e71e926bff288fade Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 29 Mar 2024 11:26:01 -0600 Subject: [PATCH] Fix sub label checking --- frigate/review/maintainer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frigate/review/maintainer.py b/frigate/review/maintainer.py index 449f61f54..6633c2015 100644 --- a/frigate/review/maintainer.py +++ b/frigate/review/maintainer.py @@ -177,8 +177,8 @@ class ReviewSegmentMaintainer(threading.Thread): for object in active_objects: if not object["sub_label"]: segment.detections[object["id"]] = object["label"] - elif object["sub_label"] in ALL_ATTRIBUTE_LABELS: - segment.detections[object["id"]] = object["sub_label"] + elif object["sub_label"][0] in ALL_ATTRIBUTE_LABELS: + segment.detections[object["id"]] = object["sub_label"][0] else: segment.detections[object["id"]] = f'{object["label"]}-verified' @@ -233,8 +233,8 @@ class ReviewSegmentMaintainer(threading.Thread): if not object["sub_label"]: detections[object["id"]] = object["label"] - elif object["sub_label"] in ALL_ATTRIBUTE_LABELS: - detections[object["id"]] = object["sub_label"] + elif object["sub_label"][0] in ALL_ATTRIBUTE_LABELS: + detections[object["id"]] = object["sub_label"][0] else: detections[object["id"]] = f'{object["label"]}-verified'