Fixed #10033: In the Oracle backend, restored code lost in the aggregation 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
This commit is contained in:
parent
14d15093bc
commit
91e25f9ef8
|
@ -87,7 +87,9 @@ def query_class(QueryClass, Database):
|
|||
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()
|
||||
|
|
Loading…
Reference in New Issue