Skip to content

Commit

Permalink
[hotfix] fixes issue around multidict
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jun 11, 2016
1 parent 1631137 commit 327fcee
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions caravel/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,14 @@ def get_url(self, **kwargs):
if d[key] is False:
del d[key]
else:
for v in d.getlist(key):
od.add(key, v)
if isinstance(d, MultiDict):
v = d.getlist(key)
else:
v = d.get(key)
if not isinstance(v, list):
v = [v]
for item in sorted(v):
od.add(key, item)
href = Href(
'/caravel/explore/{self.datasource.type}/'
'{self.datasource.id}/'.format(**locals()))
Expand Down

0 comments on commit 327fcee

Please sign in to comment.