modlinltd / django-advanced-filters

Add advanced filtering abilities to Django admin
https://pypi.org/project/django-advanced-filters/
MIT License
769 stars 172 forks source link

Getting 'This Field is required" error while submitting form for the first time #169

Open Nikhilsain opened 2 years ago

Nikhilsain commented 2 years ago

I am getting this field is required error while submitting the form for the first time even after filling the form and after the second time it got submitted. It is appending the first submission query in the second submission of the form also. Why it is having so ?. Can you please fix it. image

Nikhilsain commented 2 years ago

it is showing one extra form when i see through inspect html of the form i mean according to the above picture(added in issue) there should be only one row related to mobile but it is showing two one for mobile and one empty form

kut commented 2 years ago

Same experience here

kut commented 2 years ago

By the way - I fixed this by moving the inclusion of advanced-filters URLs BEFORE the inclusion of general Django admin. Django admin now has a catch-all error which makes advanced-filters autocomplete URLs fail if the order is wrong in your urls.py.

Nikhilsain commented 2 years ago

Hey @kut, Thanks for figuring it out :) But this working for only a single query. For multiple queries using 'and' and 'or' operator between them, I am getting the same error and order of the queries also changes. Follwing is the screenshot attached image