django-grappelli
django-grappelli copied to clipboard
drag&drop fails due to validation rule on empty element
Django Admin always adds an empty element to my list of relationships (ie. the one with the -
at the end in the below screenshot).
The problem is that when I save now, the validation rule triggers because of the ordering property being filled.
How can I prevent this?
I would also be fine if I could figure out how to prevent this default empty element from being added to the list of relationships.
ok figured out I can just set extra = 0
but would still be nice if grappelli would handle this better out of the box (ie. with extra > 0)
are you sure it's because of the ordering field (because that should not be the case). other fields can be excluded with sortable_excludes
.
I cannot definitively say so but I tried to quickly reproduce the issue on an inline model without ordering and I was unable to.
closing this for now. please reopen, if the issue still exists.