Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #10033: In the Oracle backend, restored code lost in the aggreg…

…ation merge that ensured a datetime object is returned for fields known to be datetimes, even when the time part is all zero.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9747 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 91e25f9ef8a00dcc4af83329ac2f07a08be9a2b6 1 parent 14d1509
Karen Tracey authored January 15, 2009

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  django/db/backends/oracle/query.py
4  django/db/backends/oracle/query.py
@@ -87,7 +87,9 @@ def convert_values(self, value, field):
87 87
                     value = datetime.datetime(value.year, value.month,
88 88
                             value.day, value.hour, value.minute, value.second,
89 89
                             value.fsecond)
90  
-                if field and field.get_internal_type() == 'DateField':
  90
+                if field and field.get_internal_type() == 'DateTimeField':
  91
+                    pass
  92
+                elif field and field.get_internal_type() == 'DateField':
91 93
                     value = value.date()
92 94
                 elif field and field.get_internal_type() == 'TimeField' or (value.year == 1900 and value.month == value.day == 1):
93 95
                     value = value.time()

0 notes on commit 91e25f9

Please sign in to comment.
Something went wrong with that request. Please try again.