#27223 closed Bug (duplicate)
model RangeField with default value are skiped in ModelForm full_clean validation in construct_instance function — at Version 4
Reported by: | Dariusz Paluch | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.10 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
https://github.com/django/django/commit/4bc6b939944183533ae74791d21282e613f63a96
That change in construct_instance function makes a bug with custom
full_clean validation for *RangeField like fields
RangeField values are send in POST method by two key=value pair:
my_range_0=1&my_range_1=9
that there is not my_range field in POST so field value is skipped and
not copied to instance.
Change History (4)
comment:1 by , 8 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 by , 8 years ago
Description: | modified (diff) |
---|
comment:4 by , 8 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
RangeWidget
is a subclass ofMultiWidget
so the patch for #27186 should fix this. Could you confirm?In investigating the other widgets in
contrib.postgres
, I noticed thatSplitArrayWidget
needs to be fixed. I'll push an update to my PR shortly.