#2547 closed defect (duplicate)
"blank=True" and "default" don't work correctly when create_object page doesn't submit field
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | normal | 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
In both the stable 0.95 and svn version, an IntegerField (and most likely everything else) will not use the "default" value when "blank=True", if the input field is not included on the generic view create_object page. Instead, it'll try and pass it directly to the database as null, which will cause an error, as null is not valid.
Instead, the default value should be used, and there should be no errors.
Note:
See TracTickets
for help on using tickets.
After some searching, I found ticket #1207.
http://code.djangoproject.com/ticket/1207