[CalendarServer-changes] [13287] twext/trunk/twext/who/opendirectory/_service.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Apr 15 14:36:36 PDT 2014
Revision: 13287
http://trac.calendarserver.org//changeset/13287
Author: wsanchez at apple.com
Date: 2014-04-15 14:36:36 -0700 (Tue, 15 Apr 2014)
Log Message:
-----------
Fix up _buildQuery to handle query attr
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-15 21:32:46 UTC (rev 13286)
+++ twext/trunk/twext/who/opendirectory/_service.py 2014-04-15 21:36:36 UTC (rev 13287)
@@ -371,7 +371,9 @@
matchType = ODMatchType.any.value
query, error = self._buildQuery(
- recordTypes, matchType, queryString
+ recordTypes=recordTypes,
+ matchType=matchType,
+ queryString=queryString,
)
if error:
@@ -460,9 +462,10 @@
queryValue = unicode(expression.fieldValue)
query, error = self._buildQuery(
- recordTypes,
- matchType | caseInsensitive,
- queryString
+ recordTypes=recordTypes,
+ matchType=(matchType | caseInsensitive),
+ queryAttribute=queryAttribute,
+ queryString=queryValue,
)
if error:
@@ -477,14 +480,16 @@
return query
- def _buildQuery(self, recordTypes, matchType, queryString):
+ def _buildQuery(
+ self, recordTypes, matchType, queryString, queryAttribute=None
+ ):
if not hasattr(self, "_odAttributes"):
self._odAttributes = [a.value for a in ODAttribute.iterconstants()]
return ODQuery.queryWithNode_forRecordTypes_attribute_matchType_queryValues_returnAttributes_maximumResults_error_(
self.node, # node
(t.value for t in recordTypes), # record types
- None, # attribute
+ queryAttribute, # attribute
matchType, # matchType
queryString, # queryString
self._odAttributes, # return attributes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140415/476945a1/attachment.html>
More information about the calendarserver-changes
mailing list