Opened 18 years ago

Closed 18 years ago

#4093 closed (fixed)

Oracle BooleanFields display 1/0 instead of True/False

Reported by: Ben Khoo Owned by: Jacob
Component: Uncategorized Version: other branch
Severity: Keywords: Oracle BooleanField
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hello,

Firstly congratulations on the Oracle support. I have been using it for the last few months and it is looking really good.

I have noticed a bug in the Oracle handling of BooleanFields. When querying a boolean attribute of an object, I am receiving 1 or 0 instead of True and False. An example is showed below.

In [1]: from django.contrib.auth.models import *

In [2]: u = User.objects.all()[0]

In [3]: u.is_superuser
Out[3]: 1

In [4]: u.is_staff
Out[4]: 0

In [5]: u.is_staff = True

In [6]: u.is_staff
Out[6]: True

In [7]: u.save()

In [8]: u.is_staff
Out[8]: True

In [9]: p = User.objects.get(pk=u.id)

In [10]: p.is_staff
Out[10]: 1

In [11]: p.is_superuser
Out[11]: 1

This is mentioned briefly in ticket #87 however it has long since been closed.

Kind Regards
Ben

Change History (2)

comment:1 by Ben Khoo, 18 years ago

PS I am using the boulder-oracle-sprint branch

comment:2 by Matt Boersma, 18 years ago

Resolution: fixed
Status: newclosed

(In [5046]) boulder-oracle-sprint: Fixed #4093 and added tests that cover it and the tricky datetime
fields.

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