Modify

Ticket #177 (closed defect: fixed)

Opened 5 years ago

Last modified 5 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:

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

comment:1 Changed 5 years ago by andrew

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

Agreed. Fixed in [261].

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.