tkaemming/django-orderable

Reordering inlines triggers 'This field is required error'

Opened this issue · 3 comments

Hi,

Here are the steps to reproduce this issue:

  • Run manage-tests.sh runserver
  • Go to admin
  • Add a new book
  • Fill Name, Author, Pages, and 3 chapters
  • Click 'Save and continue editing'
  • Reorder the 3 chapters using drag n drop
  • Leave the 3 empty chapters unchanged
  • "This field is required error" is triggered for the 3 empty chapters

Feel free to tell me if you need more informations.

Thanks for bringing this to my attention. I'm working on a patch for this, and should have it done within the next few days.

Any luck on fixing this?

A quick fix for this would be to only allow ordering on existing objects. You can check out my fix for this on my fork: https://github.com/bendavis78/django-orderable. The long-term fix would have to implement some way of checking for whether or not any fields other than the "order" field have changed.