[CalendarServer-changes] [13146] twext/trunk/twext/who/opendirectory/_service.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Apr 3 15:39:31 PDT 2014
Revision: 13146
http://trac.calendarserver.org//changeset/13146
Author: gaya at apple.com
Date: 2014-04-03 15:39:30 -0700 (Thu, 03 Apr 2014)
Log Message:
-----------
for OD: recordWithUID() & recordWithGUID() return firstResult()
Modified Paths:
--------------
twext/trunk/twext/who/opendirectory/_service.py
Modified: twext/trunk/twext/who/opendirectory/_service.py
===================================================================
--- twext/trunk/twext/who/opendirectory/_service.py 2014-04-03 20:33:05 UTC (rev 13145)
+++ twext/trunk/twext/who/opendirectory/_service.py 2014-04-03 22:39:30 UTC (rev 13146)
@@ -540,6 +540,20 @@
@inlineCallbacks
+ def recordWithUID(self, uid):
+ returnValue(firstResult(
+ (yield self.recordsWithFieldValue(BaseFieldName.uid, uid))
+ ))
+
+
+ @inlineCallbacks
+ def recordWithGUID(self, guid):
+ returnValue(firstResult(
+ (yield self.recordsWithFieldValue(BaseFieldName.guid, guid))
+ ))
+
+
+ @inlineCallbacks
def recordWithShortName(self, recordType, shortName):
try:
query = self._queryFromMatchExpression(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140403/8609d2f6/attachment-0001.html>
More information about the calendarserver-changes
mailing list