#1980 closed defect (fixed)
[patch] type casting for date field contains bug
Reported by: | Rudolph Froger | Owned by: | Malcolm Tredinnick |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
A DateField with null=True and blank=True returned an error when trying to save it from an edit_inline object. Solved it with the patch provided. If you can't replicate it, I'll try to create a model to do that.
Attachments (1)
Change History (6)
by , 19 years ago
Attachment: | datefield_patch.diff added |
---|
comment:1 by , 19 years ago
Summary: | type casting for date field contains bug → [patch] type casting for date field contains bug |
---|
comment:2 by , 19 years ago
Owner: | changed from | to
---|
Not sure this is being done in the right place. The value must be set to None as is in this patch, not empty string, for example (the tests pick up that problem). But why don't we have the same problems in DateTimeField? It seems to be working a bit differently. I suspect there might be a deeper bug lurking that lets us get through to this point in the code with the wrong value.
Not committing this yet until I can look into it a bit more.
comment:4 by , 18 years ago
Mtredinnick, thanks for planning to look into it. A fix would be really nice.
comment:5 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was fixed in [3277], but somehow I messed up the "auto-close" portion of the commit message. For the record, the commit message was:
Fixed #1980, #2155 -- made date, time and datetime html2python methods a bit
more consistent in their return values. All three now return None when the
passed in string cannot be converted to the required object (this is assumed
elsewhere).
Trying to get some attention for this bug by adding [patch] to the title.