mirror of
https://github.com/django/django.git
synced 2025-11-11 16:23:59 +00:00
Fixed #23434 -- Coerce Oracle bool params to int
This commit is contained in:
parent
60c38c1a4e
commit
638d1393ee
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue