Commit 804b1302 by Seth Vidal

check if the term is a dict so we can take a simple list of files (like first_available_file) takes

parent dfad9407
......@@ -81,6 +81,7 @@ class LookupModule(object):
def run(self, terms, **kwargs):
result = None
for term in terms:
if isinstance(term, dict):
files = term.get('files', [])
paths = term.get('paths', [])
......@@ -108,7 +109,8 @@ class LookupModule(object):
for fn in filelist:
f = path + '/' + fn
total_search.append(f)
else:
total_search = [term]
result = None
for fn in total_search:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment