File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -166,9 +166,18 @@ def _define_searchables(self):
166166 atk_attrs = self .get_attributes ()
167167 for atk_attr in atk_attrs :
168168 if atk_attrs [atk_attr ] is not None :
169- if not isinstance (atk_attrs [atk_attr ], str ) and not isinstance (atk_attrs [atk_attr ], bool ):
169+ if isinstance (atk_attrs [atk_attr ], list ):
170+ attr_list = atk_attrs [atk_attr ]
171+ for attr in attr_list :
172+ if isinstance (atk_attrs [atk_attr ], str ) or isinstance (atk_attrs [atk_attr ], bool ):
173+ result .add_term (atk_attr , str (attr ))
174+ print (atk_attr , str (attr ))
175+ else :
176+ print ("wrong type %s" % str (atk_attr ))
177+ elif not isinstance (atk_attrs [atk_attr ], str ) and not isinstance (atk_attrs [atk_attr ], bool ):
170178 print ("wrong type %s" % str (atk_attr ))
171- result .add_term (atk_attr , str (atk_attrs [atk_attr ]))
179+ else :
180+ result .add_term (atk_attr , str (atk_attrs [atk_attr ]))
172181 return [result ]
173182
174183 @staticmethod
You can’t perform that action at this time.
0 commit comments