@@ -1065,10 +1065,6 @@ def get_items(self, limit=None, *, query=None, order_by=None, batch=None):
1065
1065
params ['$orderby' ] = order_by
1066
1066
1067
1067
if query :
1068
- # if query.has_filters:
1069
- # warnings.warn('Filters are not allowed by the '
1070
- # 'Api Provider in this method')
1071
- # query.clear_filters()
1072
1068
if isinstance (query , str ):
1073
1069
params ['$filter' ] = query
1074
1070
else :
@@ -1107,7 +1103,8 @@ def get_child_folders(self, limit=None, *, query=None, order_by=None, batch=None
1107
1103
"""
1108
1104
1109
1105
if query :
1110
- query = query .on_attribute ('folder' ).unequal (None )
1106
+ if not isinstance (query , str ):
1107
+ query = query .on_attribute ('folder' ).unequal (None )
1111
1108
else :
1112
1109
query = self .q ('folder' ).unequal (None )
1113
1110
@@ -1211,14 +1208,14 @@ def search(self, search_text, limit=None, *, query=None, order_by=None,
1211
1208
params ['$orderby' ] = order_by
1212
1209
1213
1210
if query :
1214
- if query .has_filters :
1215
- warnings .warn (
1216
- 'Filters are not allowed by the Api '
1217
- 'Provider in this method' )
1218
- query .clear_filters ()
1219
1211
if isinstance (query , str ):
1220
1212
params ['$filter' ] = query
1221
1213
else :
1214
+ if query .has_filters :
1215
+ warnings .warn (
1216
+ 'Filters are not allowed by the Api '
1217
+ 'Provider in this method' )
1218
+ query .clear_filters ()
1222
1219
params .update (query .as_params ())
1223
1220
1224
1221
response = self .con .get (url , params = params )
0 commit comments