Gauravwagh / django-grappelli

Automatically exported from code.google.com/p/django-grappelli
Other
0 stars 0 forks source link

Sortable Inlines with required fields are incorrectly submitted. #337

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a ModelAdmin with an inline for a model with a sortable field, at 
least one required field, and at least one extra form.
2. Leaving the inlines completely empty, try to save the page.

What is the expected output? What do you see instead?
The expected result is that the page will save. Instead, the empty forms will 
prevent saving because the required fields are not filled out. This only 
happens with sortable_field_name set, so it's probably related to the sortable 
field being set and causing the form to register as partially filled out.

What version of the product are you using? On what operating system?
r1399 on MacOS X (10.6.4) with Firefox 3.6.3/Safari 5.0.1/Chrome 5.0.342.9 beta

Please provide any additional information below.

Original issue reported on code.google.com by Stephen....@gmail.com on 10 Jan 2011 at 5:12

GoogleCodeExporter commented 9 years ago
sorry, but I can´t reproduce this one either: I´m having several different 
inlines for testing (a bunch of them with required fields).

do you see what happens with the position-field when trying to save? is there a 
value (because with the form being empty, the position-field shouldn´t have a 
value), see 
http://code.google.com/p/django-grappelli/source/browse/trunk/grappelli/template
s/admin/edit_inline/tabular.html?r=1399#117 to 
http://code.google.com/p/django-grappelli/source/browse/trunk/grappelli/template
s/admin/edit_inline/tabular.html?r=1399#126

Original comment by sehmaschine on 10 Jan 2011 at 7:11

GoogleCodeExporter commented 9 years ago
I'm not sure where exactly the issue was, but this seems to also have been 
fixed by setting up staticfiles correctly.

Original comment by Stephen....@gmail.com on 13 Jan 2011 at 3:21

GoogleCodeExporter commented 9 years ago

Original comment by sehmaschine on 13 Jan 2011 at 8:00

GoogleCodeExporter commented 9 years ago
This issue has popped up again. I tried just ignoring it, but it's caused a lot 
of frustration for me and my clients. A coworker of mine has actually stopped 
including extra forms in inline model admins and I'm going to start following 
suit until this is actually resolved. At the moment I don't have time to create 
a test case - perhaps I'll do that later.

Original comment by Stephen....@gmail.com on 28 Jun 2011 at 7:21

GoogleCodeExporter commented 9 years ago
try to use a PositiveIntegerField instead of a PositionField.

Original comment by sehmaschine on 29 Jun 2011 at 12:06