Author: kmtracey
Date: 2009-01-15 09:11:28 -0600 (Thu, 15 Jan 2009)
New Revision: 9747

Modified:
   django/trunk/django/db/backends/oracle/query.py
Log:
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.


Modified: django/trunk/django/db/backends/oracle/query.py
===================================================================
--- django/trunk/django/db/backends/oracle/query.py     2009-01-15 14:07:53 UTC 
(rev 9746)
+++ django/trunk/django/db/backends/oracle/query.py     2009-01-15 15:11:28 UTC 
(rev 9747)
@@ -87,7 +87,9 @@
                     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()


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to