Opened 4 years ago

Closed 4 years ago

#14302 closed (duplicate)

models.BooleanField returns integer

Reported by: anonymous Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords: boolean, type
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I declare a field as models.BooleanField(default=False) in a model, but accessing it returns an integer 0 instead of boolean False. This is a rather insiduous bug, since inside of Python they'll evaluate to the same thing, but I happen to be sending that data to a client written in Java.

Change History (1)

comment:1 Changed 4 years ago by anonymous

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

Duplicate of #7190. This was fixed over 7 months ago in r12578. Releases greater than 1.1.2 (r13258) will have the fix.

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