[1.6.x] Fixed #22551 -- Made oracle backend method Python 3 compatible

Thanks fatal10110 at gmail.com for the report. The fix is 1.6-only
because that code has been refactored in 1.7 (6983201cfb).
This commit is contained in:
Claude Paroz 2014-05-01 18:10:16 +02:00
parent c1692fa25a
commit 120a981207
2 changed files with 3 additions and 2 deletions

View File

@ -446,7 +446,7 @@ WHEN (new.%(col_name)s IS NULL)
bounds = super(DatabaseOperations, self).year_lookup_bounds_for_datetime_field(value) bounds = super(DatabaseOperations, self).year_lookup_bounds_for_datetime_field(value)
if settings.USE_TZ: if settings.USE_TZ:
bounds = [b.astimezone(timezone.utc).replace(tzinfo=None) for b in bounds] bounds = [b.astimezone(timezone.utc).replace(tzinfo=None) for b in bounds]
return [b.isoformat(b' ') for b in bounds] return [b.isoformat(str(' ')) for b in bounds]
def combine_expression(self, connector, sub_expressions): def combine_expression(self, connector, sub_expressions):
"Oracle requires special cases for %% and & operators in query expressions" "Oracle requires special cases for %% and & operators in query expressions"

View File

@ -9,4 +9,5 @@ Django 1.6.5 fixes several bugs in 1.6.4.
Bugfixes Bugfixes
======== ========
* ... * Made the ``year_lookup_bounds_for_datetime_field`` Oracle backend method
Python 3 compatible (`#22551 <http://code.djangoproject.com/ticket/22551>`_).