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

Saving an advanced filter with an "Or" in it sometimes reorders the "Or" to the last element #168

Open bdnettleton opened 2 years ago

bdnettleton commented 2 years ago

Describe the bug After creating or updating a filter with an "Or (mark an or between blocks)" sometimes the order of the blocks gets changed moving the "Or ..." to the bottom of the blocks. When this happens the filter does not work correctly.

The first attached image is of a filter being edited immediately before saving, and the second attached image is immediately after saving.

Repeated deletes and saves eventually seem to fix the problem.

Before Save: Before Save

After Save: After Save

Expected behavior Saving a set of blocks shouldn't reorder the blocks.

Screenshots See attached

Details (please complete the following information):