Modify ↓
Ticket #177 (closed defect: fixed)
keep_default=False fails when default value provided is empty string or 0
| Reported by: | cmkmrr | Owned by: | andrew |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.6 |
| Component: | migrations | Version: | 0.6-pre |
| Keywords: | keep_default empty string default | Cc: |
Description
When using add_column's keep_default parameter, if the default provided in the migration is empty string it is never removed.
In svn rev260 south/db/generic.py(211) the check for keep_default is:
if not keep_default and field.default:
When I think the correct check should be:
if not keep_default and field.default is not None:
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

Agreed. Fixed in [261].