diff --git a/frigate/events.py b/frigate/events.py index b90204361..f37a23bb7 100644 --- a/frigate/events.py +++ b/frigate/events.py @@ -79,6 +79,7 @@ class EventProcessor(threading.Thread): area=event_data["area"], has_clip=event_data["has_clip"], has_snapshot=event_data["has_snapshot"], + sub_label=None, ).execute() elif event_type == "end": diff --git a/frigate/http.py b/frigate/http.py index 7fa81d7cf..839cf50fc 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -163,9 +163,9 @@ def set_sub_label(id): ) if request.json: - new_sub_label = request.json.get("subLabel", "") + new_sub_label = request.json.get("subLabel") else: - new_sub_label = "" + new_sub_label = None if new_sub_label: @@ -188,7 +188,7 @@ def delete_sub_label(id): jsonify({"success": False, "message": "Event " + id + " not found"}), 404 ) - event.sub_label = "" + event.sub_label = None event.save() return make_response( jsonify({"success": True, "message": "Event " + id + " sub label removed"}), 200