added organisation and acronyms in admin query field

This commit is contained in:
asamihassan 2022-04-12 13:31:14 +05:00
parent 8e409d1a38
commit c84ae636c5

View file

@ -116,7 +116,7 @@ class PersonAdmin(admin.ModelAdmin):
def get_field_queryset(self, db, db_field, request):
queryset = super().get_field_queryset(db, db_field, request)
if db_field.name == 'organization':
queryset = queryset.order_by('country','organisation_english')
queryset = queryset.order_by('country','organisation_english','organisation_2','organisation_3', 'acronym')
return queryset
class ResourceKeywordInline(admin.TabularInline):
autocomplete_fields = ['keyword']