mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 15:45:27 +03:00
ensure descriptions can be empty
This commit is contained in:
parent
8063ec38bb
commit
a298b395dd
@ -911,7 +911,11 @@ def set_description(id):
|
|||||||
json: dict[str, any] = request.get_json(silent=True) or {}
|
json: dict[str, any] = request.get_json(silent=True) or {}
|
||||||
new_description = json.get("description")
|
new_description = json.get("description")
|
||||||
|
|
||||||
event.data["description"] = new_description or None
|
# ensure we can save an empty description
|
||||||
|
if new_description:
|
||||||
|
event.data["description"] = new_description
|
||||||
|
else:
|
||||||
|
event.data.pop("description", None)
|
||||||
event.save()
|
event.save()
|
||||||
|
|
||||||
# If semantic search is enabled, update the index
|
# If semantic search is enabled, update the index
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user