Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@kmtracey kmtracey authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 django/db/backends/oracle/query.py
View
4 django/db/backends/oracle/query.py
@@ -87,7 +87,9 @@ def convert_values(self, value, field):
value = datetime.datetime(value.year, value.month,
value.day, value.hour, value.minute, value.second,
value.fsecond)
- if field and field.get_internal_type() == 'DateField':
+ if field and field.get_internal_type() == 'DateTimeField':
+ pass
+ elif field and field.get_internal_type() == 'DateField':
value = value.date()
elif field and field.get_internal_type() == 'TimeField' or (value.year == 1900 and value.month == value.day == 1):
value = value.time()
Please sign in to comment.
Something went wrong with that request. Please try again.