[CalendarServer-changes] [13385] CalendarServer/trunk/txdav/who/directory.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Apr 30 12:22:22 PDT 2014
Revision: 13385
http://trac.calendarserver.org//changeset/13385
Author: sagen at apple.com
Date: 2014-04-30 12:22:22 -0700 (Wed, 30 Apr 2014)
Log Message:
-----------
Deal with missing fullNames
Modified Paths:
--------------
CalendarServer/trunk/txdav/who/directory.py
Modified: CalendarServer/trunk/txdav/who/directory.py
===================================================================
--- CalendarServer/trunk/txdav/who/directory.py 2014-04-30 00:02:34 UTC (rev 13384)
+++ CalendarServer/trunk/txdav/who/directory.py 2014-04-30 19:22:22 UTC (rev 13385)
@@ -332,7 +332,10 @@
@property
def displayName(self):
- return self.fullNames[0]
+ try:
+ return self.fullNames[0]
+ except AttributeError:
+ return u""
def cacheToken(self):
@@ -513,11 +516,11 @@
if "PARTSTAT" not in params:
params["PARTSTAT"] = "NEEDS-ACTION"
if "CN"not in params:
- if self.fullNames:
- params["CN"] = list(self.fullNames)[0]
+ if self.displayName:
+ params["CN"] = self.displayName.encode("utf-8")
if "EMAIL" not in params:
- if self.emailAddresses:
- params["EMAIL"] = list(self.emailAddresses)[0]
+ if hasattr(self, "emailAddresses"):
+ params["EMAIL"] = list(self.emailAddresses)[0].encode("utf-8")
if "CUTYPE" not in params:
cuType = self.getCUType()
if cuType is not "INDIVIDUAL":
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140430/aa761ab4/attachment.html>
More information about the calendarserver-changes
mailing list