mirror of
https://github.com/django/django.git
synced 2025-03-06 07:22:32 +00:00
Fixed #23434 -- Coerce Oracle bool params to int
This commit is contained in:
parent
60c38c1a4e
commit
638d1393ee
@ -772,9 +772,9 @@ class OracleParam(object):
|
|||||||
# Oracle doesn't recognize True and False correctly in Python 3.
|
# Oracle doesn't recognize True and False correctly in Python 3.
|
||||||
# The conversion done below works both in 2 and 3.
|
# The conversion done below works both in 2 and 3.
|
||||||
if param is True:
|
if param is True:
|
||||||
param = "1"
|
param = 1
|
||||||
elif param is False:
|
elif param is False:
|
||||||
param = "0"
|
param = 0
|
||||||
if hasattr(param, 'bind_parameter'):
|
if hasattr(param, 'bind_parameter'):
|
||||||
self.force_bytes = param.bind_parameter(cursor)
|
self.force_bytes = param.bind_parameter(cursor)
|
||||||
elif isinstance(param, Database.Binary):
|
elif isinstance(param, Database.Binary):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user