Ticket #177 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

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:


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:

Change History

comment:1 Changed 6 years ago by andrew

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 0.6

Agreed. Fixed in [261].

Note: See TracTickets for help on using tickets.