Opened 7 years ago

Closed 7 years ago

#6229 closed (duplicate)

loaddata should allow null for BooleanField(null=true)

Reported by: odonian Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Keywords: loaddata dumpdata BooleanField null
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


If I have a model with a BooleanField(blank=True, null=True), then proceed to run dumpdata, it seems that loaddata will fail with an error.

Problem installing fixture '/foo/bar/datadump.json':
[u'This value must be either True or False.']

I hand-edited the fixture file to change all the "null" values for the said BooleanField field to "false" and the fixture loads fine. But methinks loaddata should allow nulls when the definition allows it.

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #5563.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

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

Note: See TracTickets for help on using tickets.