Django

Code

Ticket #4093 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

Oracle BooleanFields display 1/0 instead of True/False

Reported by: Ben Khoo Assigned to: jacob
Milestone: Component: Uncategorized
Version: other branch Keywords: Oracle BooleanField
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Change History

04/20/07 07:00:37 changed by Ben Khoo

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

PS I am using the boulder-oracle-sprint branch

04/20/07 12:31:42 changed by bouldersprinters

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #4093 (Oracle BooleanFields display 1/0 instead of True/False)




Change Properties
Action