iommirocks / iommi

Your first pick for a django power cord
http://iommi.rocks
BSD 3-Clause "New" or "Revised" License
688 stars 47 forks source link

choice_queryset__extra__filter_and_sort overrides default order #448

Open berycz opened 12 months ago

berycz commented 12 months ago

in form.py in choice_queryset__extra__filter_and_sort there is

    if not value:
        return field.choices.order_by(*field.search_fields)

which overrides the passed/default order I think it should not do that, either leave it to the dev or let it use the Model._meta.ordering

berycz commented 12 months ago

or for backwards compatibility add an extra parameter for that