Use distinct instead of group_by

This commit is contained in:
Nick Mowen 2022-05-26 09:23:23 -06:00
parent cbfebe499f
commit 9f1da8746f

View File

@ -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(