From 3ecf3c51fc5027c378a5b6d530903385d51604b4 2023-08-02 17:27:21 From: Edson Date: 2023-08-02 17:27:21 Subject: [PATCH] v2.9.2 :: Add 'tags' in search option - dataset --- diff --git a/jrodb/api.py b/jrodb/api.py index f116300..647f468 100755 --- a/jrodb/api.py +++ b/jrodb/api.py @@ -206,6 +206,18 @@ class Api(): else: return '"dataset_end_date" must be ' #----------------------------------------------------# + if 'tags' in query: + if isinstance(query['tags'], (int, float, str, list)): + if type(query['tags']) is list: + for u in query['tags']: + self.dict['fq_list'].append('tags:"'+str(u)+'"') + else: + self.dict['fq_list'].append('tags:"'+str(query['tags'])+'"') + + self.list.append('tags') + else: + return '"tags" must be or or or ' + #----------------------------------------------------# for key, value in query.items(): if value is not None and not key in self.list: self.dict['fq_list'].append(str(key)+':"'+str(value)+'"')