[CalendarServer-changes] [13061] twext/trunk/twext/who/xml.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 31 13:18:50 PDT 2014
Revision: 13061
http://trac.calendarserver.org//changeset/13061
Author: sagen at apple.com
Date: 2014-03-31 13:18:49 -0700 (Mon, 31 Mar 2014)
Log Message:
-----------
Fix xml round trip of empty strings
Modified Paths:
--------------
twext/trunk/twext/who/xml.py
Modified: twext/trunk/twext/who/xml.py
===================================================================
--- twext/trunk/twext/who/xml.py 2014-03-31 20:17:32 UTC (rev 13060)
+++ twext/trunk/twext/who/xml.py 2014-03-31 20:18:49 UTC (rev 13061)
@@ -336,7 +336,10 @@
valueType = self.fieldName.valueType(fieldName)
if valueType in (unicode, UUID):
- value = valueType(fieldNode.text)
+ if fieldNode.text is None and valueType is unicode:
+ value = u""
+ else:
+ value = valueType(fieldNode.text)
elif valueType is bool:
boolElement = self._constantElement(fieldNode)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140331/a1c51128/attachment-0001.html>
More information about the calendarserver-changes
mailing list