Optionally show organizer slug in select2 (#5605)

This commit is contained in:
luelista
2025-11-12 13:28:31 +01:00
committed by GitHub
parent e99eecb8be
commit 0256ee76db

View File

@@ -820,12 +820,13 @@ def organizer_select2(request):
total = qs.count()
pagesize = 20
offset = (page - 1) * pagesize
display_slug = 'display_slug' in request.GET
doc = {
"results": [
{
'id': o.pk,
'text': str(o.name)
'text': '{}{}'.format(o.slug, o.name) if display_slug else str(o.name)
} for o in qs[offset:offset + pagesize]
],
"pagination": {