mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
Use distinct instead of group_by
This commit is contained in:
parent
cbfebe499f
commit
9f1da8746f
@ -250,9 +250,7 @@ def set_sub_label(id):
|
|||||||
def get_sub_labels():
|
def get_sub_labels():
|
||||||
try:
|
try:
|
||||||
events = (
|
events = (
|
||||||
Event.select(
|
Event.select(Event.sub_label).distinct()
|
||||||
Event.sub_label,
|
|
||||||
).group_by(Event.sub_label)
|
|
||||||
).dicts()
|
).dicts()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return jsonify(
|
return jsonify(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user