[CalendarServer-changes] [7148] CalendarServer/branches/users/glyph/oracle/twext/enterprise/util.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 7 19:06:43 PST 2011
Revision: 7148
http://trac.macosforge.org/projects/calendarserver/changeset/7148
Author: glyph at apple.com
Date: 2011-03-07 19:06:42 -0800 (Mon, 07 Mar 2011)
Log Message:
-----------
deal with integers as integers; since we don't actually have any REALs but lots of INTEGERs this is more like an educated guess for the moment
Modified Paths:
--------------
CalendarServer/branches/users/glyph/oracle/twext/enterprise/util.py
Modified: CalendarServer/branches/users/glyph/oracle/twext/enterprise/util.py
===================================================================
--- CalendarServer/branches/users/glyph/oracle/twext/enterprise/util.py 2011-03-08 03:06:31 UTC (rev 7147)
+++ CalendarServer/branches/users/glyph/oracle/twext/enterprise/util.py 2011-03-08 03:06:42 UTC (rev 7148)
@@ -49,7 +49,13 @@
# just detect the datetimes and stringify them, for now
# we'll do that.
return column.strftime(SQL_TIMESTAMP_FORMAT)
+ elif isinstance(column, float):
+ if int(column) == column:
+ return int(column)
+ else:
+ return column
else:
return column
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110307/ea75b913/attachment-0001.html>
More information about the calendarserver-changes
mailing list