modlinltd/django-advanced-filters

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

Opened this issue · 0 comments

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):

  • OS: Mac OS-X
  • Python version 3.8
  • Django version 3.2
  • django-advanced-filters version 2.0
  • Browser Safari
  • Version 15.5