Skip to content

Commit

Permalink
Merge pull request #107 from arthur-schnitzler/main
Browse files Browse the repository at this point in the history
order autocompletes by id (#248)
  • Loading branch information
csae8092 authored Nov 10, 2024
2 parents 5aed720 + e267c10 commit 0285a5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis_core/apis_entities/autocomplete3.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get(self, request, *args, **kwargs):
Q(**{x + search_type: q})
for x in settings.APIS_ENTITIES[ac_type.title()]["search"]
]
res = ent_model.objects.filter(reduce(operator.or_, arg_list)).distinct()
res = ent_model.objects.filter(reduce(operator.or_, arg_list)).order_by('id').distinct()
if q3:
f_dict2 = {}
for fd in q3:
Expand Down

0 comments on commit 0285a5b

Please sign in to comment.