1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Simplified, very slightly, some code in the oracle backend

This commit is contained in:
Alex Gaynor 2014-05-28 17:17:58 -07:00
parent 61185bba72
commit e79725cdf9

View File

@ -260,7 +260,7 @@ WHEN (new.%(col_name)s IS NULL)
# empty string.
if value is None and field and field.empty_strings_allowed:
if field.get_internal_type() == 'BinaryField':
value = bytes() # same as '' on PY2 but different on PY3
value = b''
else:
value = ''
# Convert 1 or 0 to True or False