Opened 12 years ago

Closed 12 years ago

#19341 closed Bug (fixed)

inspectdb BooleanField instead of NullBooleanField where Null=True

Reported by: tim.bowden@… Owned by: nobody
Component: Core (Management commands) Version: 1.5-alpha-1
Severity: Normal Keywords: inspectdb BooleanField NullBooleanField
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Where db field is bool and null=True, inspectdb outputs:

<fieldname> = models.BooleanField(Null=True,...)

instead of models.NullBooleanField(Null=True,...)

Attachments (1)

19341-1.diff (3.5 KB ) - added by Claude Paroz 12 years ago.
Detect NullBooleanField in inspectdb

Download all attachments as: .zip

Change History (4)

comment:1 by Claude Paroz, 12 years ago

Triage Stage: UnreviewedAccepted

by Claude Paroz, 12 years ago

Attachment: 19341-1.diff added

Detect NullBooleanField in inspectdb

comment:2 by Claude Paroz, 12 years ago

Has patch: set

As often, tests harder than the fix :-)

comment:3 by Claude Paroz <claude@…>, 12 years ago

Resolution: fixed
Status: newclosed

In 7bbd17bf20e46283954aead2750c24642fd8d9f9:

Fixed #19341 -- Detected NullBooleanField when introspecting models

Thanks Tim Bowden for the report.

Note: See TracTickets for help on using tickets.
Back to Top