Commit 120a9812 authored by Claude Paroz's avatar Claude Paroz
Browse files

[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 (6983201c).
parent c1692fa2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -446,7 +446,7 @@ WHEN (new.%(col_name)s IS NULL)
        bounds = super(DatabaseOperations, self).year_lookup_bounds_for_datetime_field(value)
        if settings.USE_TZ:
            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):
        "Oracle requires special cases for %% and & operators in query expressions"
+2 −1
Original line number Diff line number Diff line
@@ -9,4 +9,5 @@ Django 1.6.5 fixes several bugs in 1.6.4.
Bugfixes
========

* ...
* Made the ``year_lookup_bounds_for_datetime_field`` Oracle backend method
  Python 3 compatible (`#22551 <http://code.djangoproject.com/ticket/22551>`_).