Opened 3 years ago

Closed 2 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 claudep 3 years ago.
Detect NullBooleanField in inspectdb

Download all attachments as: .zip

Change History (4)

comment:1 Changed 3 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 3 years ago by claudep

Detect NullBooleanField in inspectdb

comment:2 Changed 3 years ago by claudep

  • Has patch set

As often, tests harder than the fix :-)

comment:3 Changed 2 years ago by Claude Paroz <claude@…>

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

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