Ticket #3721: oracle_lazydate.patch

File oracle_lazydate.patch, 879 bytes (added by Ben Khoo <benk@…>, 18 years ago)

Temporary workaround to replace the LazyDate with the DateTime

  • django/db/backends/oracle/base.py

     
    7777    you'll need to use "%%s".
    7878    """
    7979    def _rewrite_args(self, query, params=None):
     80        from django.db.models import LazyDate   
    8081        if params is None:
    8182            params = []
    8283        else:
     
    8788                        params[i] = param.encode('utf-8')
    8889                    except UnicodeError:
    8990                        params[i] = str(param)
     91                if type(param) == LazyDate:
     92                    params[i] = param.__get_value__()
    9093        args = [(':arg%d' % i) for i in range(len(params))]
    9194        query = query % tuple(args)
    9295        # cx_Oracle cannot execute a query with the closing ';'
Back to Top