Opened 8 years ago

Closed 8 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.

Change History (1)

comment:1 Changed 8 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.

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