Skip to content

Commit

Permalink
fix: model-autocomplete bug (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCLeduc authored Nov 22, 2024
1 parent f1dcd76 commit e53b3a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autocomplete/shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def get_items_from_keys(cls, keys, context):
queryset = cls.get_queryset()
results = queryset.filter(id__in=keys)

return [{"key": person.id, "label": person.name} for person in results]
return [
{"key": record.id, "label": cls.get_label_for_record(record)}
for record in results
]


class QuerysetMappedIterable:
Expand Down

0 comments on commit e53b3a0

Please sign in to comment.