Permalink
Browse files

Improve robustness of get_request_list()

Depending on what type of request dict is provided, the 'getlist'
method might not be available. Only call the method if it is there.
  • Loading branch information...
tomka committed Aug 30, 2018
1 parent 7ceb125 commit 4a62aa02852ced6a31141fff9986b0236f56efce
Showing with 4 additions and 3 deletions.
  1. +4 −3 django/applications/catmaid/control/common.py
@@ -101,9 +101,10 @@ def add_items(items, name):
if items:
return items
items = [map_fn(v) for v in request_dict.getlist(name, [])]
if items:
return items
if hasattr(request_dict, 'getlist'):
items = [map_fn(v) for v in request_dict.getlist(name, [])]
if items:
return items
return default

0 comments on commit 4a62aa0

Please sign in to comment.