Code

Opened 7 years ago

Closed 7 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: UI/UX:

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

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by Ben Khoo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

PS I am using the boulder-oracle-sprint branch

comment:2 Changed 7 years ago by bouldersprinters

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

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

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.