#3501: [patch] sqlite selection on datetime members fail when datefield is null ---------------------------------------------------+------------------------ Reporter: anonymous | Owner: baumer1122 Status: reopened | Milestone: Component: Database layer (models, ORM) | Version: SVN Resolution: | Keywords: sqlite Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 1 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Changes (by fero):
* status: closed => reopened * resolution: fixed => Comment: For me the patched version did not work. In order to support also blank=True DateTime fields I apply the following patch. {{{ --- django/db/backends/sqlite3/base.py 2009-02-12 12:24:12.000000000 +0100 +++ django/db/backends/sqlite3/base.py.new 2009-02-12 12:23:52.000000000 +0100 @@ -179,7 +179,7 @@ return query % tuple("?" * num_params) def _sqlite_extract(lookup_type, dt): - if dt is None: + if dt in (None, u""): return None try: dt = util.typecast_timestamp(dt) }}} -- Ticket URL: <http://code.djangoproject.com/ticket/3501#comment:14> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---