Skip to content
Snippets Groups Projects
Commit 9b28c61f authored by Antoine Lambert's avatar Antoine Lambert
Browse files

fix exception when no documentation is provided for api route arguments

parent ada80ffb
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ class APIUrls(object):
for param in url_rule_params:
param_name = re.findall('<(.*)>', param)
param_name = param_name[0] if len(param_name) > 0 else None
if param_name and hasattr(f, 'doc_data'):
if param_name and hasattr(f, 'doc_data') and 'args' in f.doc_data: # noqa
param_index = \
next(i for (i, d) in enumerate(f.doc_data['args'])
if d['name'] == param_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment