jrief / django-admin-sortable2

Generic drag-and-drop ordering for objects in the Django admin interface
https://django-admin-sortable2.readthedocs.io/en/latest/
Other
753 stars 179 forks source link

Issue with actions in listing screen. #408

Open girase1pranay opened 2 weeks ago

girase1pranay commented 2 weeks ago

Python: 3.11 Django: 5.0.4

In admin change list, "move_to_exact_page", "move_to_back_page", "move_to_forward_page" if we select any of this action, new input field renders which accepts number. But if we don't give any input to the field then it is raising exception as follows:

invalid literal for int() with base 10: ''

as in admin.py line no.379 it is written as

step = int(request.POST.get('step'),1)

here, request.POST.get('step',1) will always returns '' (blank string) if no value passed to the input field.

** same on admin.py line no.376