@@ -206,6 +206,18 class Api(): | |||||
206 | else: |
|
206 | else: | |
207 | return '"dataset_end_date" must be <str>' |
|
207 | return '"dataset_end_date" must be <str>' | |
208 | #----------------------------------------------------# |
|
208 | #----------------------------------------------------# | |
|
209 | if 'tags' in query: | |||
|
210 | if isinstance(query['tags'], (int, float, str, list)): | |||
|
211 | if type(query['tags']) is list: | |||
|
212 | for u in query['tags']: | |||
|
213 | self.dict['fq_list'].append('tags:"'+str(u)+'"') | |||
|
214 | else: | |||
|
215 | self.dict['fq_list'].append('tags:"'+str(query['tags'])+'"') | |||
|
216 | ||||
|
217 | self.list.append('tags') | |||
|
218 | else: | |||
|
219 | return '"tags" must be <list> or <float> or <int> or <str>' | |||
|
220 | #----------------------------------------------------# | |||
209 | for key, value in query.items(): |
|
221 | for key, value in query.items(): | |
210 | if value is not None and not key in self.list: |
|
222 | if value is not None and not key in self.list: | |
211 | self.dict['fq_list'].append(str(key)+':"'+str(value)+'"') |
|
223 | self.dict['fq_list'].append(str(key)+':"'+str(value)+'"') |
General Comments 0
You need to be logged in to leave comments.
Login now