[CalendarServer-changes] [10604] CalendarServer/trunk/twext/who

source_changes at macosforge.org source_changes at macosforge.org
Wed Jan 30 14:54:29 PST 2013


Revision: 10604
          http://trac.calendarserver.org//changeset/10604
Author:   wsanchez at apple.com
Date:     2013-01-30 14:54:29 -0800 (Wed, 30 Jan 2013)
Log Message:
-----------
Export RecordType. Add fullNames field.

Modified Paths:
--------------
    CalendarServer/trunk/twext/who/directory.py
    CalendarServer/trunk/twext/who/idirectory.py

Modified: CalendarServer/trunk/twext/who/directory.py
===================================================================
--- CalendarServer/trunk/twext/who/directory.py	2013-01-30 21:41:29 UTC (rev 10603)
+++ CalendarServer/trunk/twext/who/directory.py	2013-01-30 22:54:29 UTC (rev 10604)
@@ -59,8 +59,8 @@
     implements(IDirectoryRecord)
 
     requiredFields = (
+        FieldName.uid,
         FieldName.recordType,
-        FieldName.uid,
         FieldName.shortNames,
     )
 

Modified: CalendarServer/trunk/twext/who/idirectory.py
===================================================================
--- CalendarServer/trunk/twext/who/idirectory.py	2013-01-30 21:41:29 UTC (rev 10603)
+++ CalendarServer/trunk/twext/who/idirectory.py	2013-01-30 22:54:29 UTC (rev 10604)
@@ -21,6 +21,7 @@
 __all__ = [
     "DirectoryServiceError",
     "QueryNotSupportedError",
+    "RecordType",
     "FieldName",
     "MatchType",
     "Operand",
@@ -65,18 +66,20 @@
     """
     Constants for common field names.
     """
+    uid            = NamedConstant()
+    guid           = NamedConstant()
     recordType     = NamedConstant()
     shortNames     = NamedConstant()
-    uid            = NamedConstant()
-    guid           = NamedConstant()
+    fullNames      = NamedConstant()
     emailAddresses = NamedConstant()
 
     shortNames.multiValue     = True
+    fullNames.multiValue      = True
     emailAddresses.multiValue = True
 
     @classmethod
     def isMultiValue(cls, name):
-        return hasattr(name, "multiValue") and name.multiValue
+        return getattr(name, "multiValue", False)
 
 class MatchType(Names):
     """
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130130/b7963028/attachment.html>


More information about the calendarserver-changes mailing list