mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 15:15:22 +03:00
return description consistently under data object
This commit is contained in:
parent
641f1244dd
commit
913812dc1e
@ -302,8 +302,21 @@ def events_explore():
|
|||||||
.dicts()
|
.dicts()
|
||||||
)
|
)
|
||||||
|
|
||||||
events = query.iterator()
|
events = list(query.iterator())
|
||||||
return jsonify(list(events))
|
|
||||||
|
processed_events = [
|
||||||
|
{k: v for k, v in event.items() if k != "data"}
|
||||||
|
| {
|
||||||
|
"data": {
|
||||||
|
k: v
|
||||||
|
for k, v in event["data"].items()
|
||||||
|
if k in ["type", "score", "top_score", "description"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for event in events
|
||||||
|
]
|
||||||
|
|
||||||
|
return jsonify(processed_events)
|
||||||
|
|
||||||
|
|
||||||
@EventBp.route("/event_ids")
|
@EventBp.route("/event_ids")
|
||||||
@ -507,9 +520,11 @@ def events_search():
|
|||||||
events = [
|
events = [
|
||||||
{k: v for k, v in event.items() if k != "data"}
|
{k: v for k, v in event.items() if k != "data"}
|
||||||
| {
|
| {
|
||||||
k: v
|
"data": {
|
||||||
for k, v in event["data"].items()
|
k: v
|
||||||
if k in ["type", "score", "top_score", "description"]
|
for k, v in event["data"].items()
|
||||||
|
if k in ["type", "score", "top_score", "description"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
"search_distance": results[event["id"]]["distance"],
|
"search_distance": results[event["id"]]["distance"],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user