Skip to content

Commit

Permalink
fix missing multiple values for the same parameter name (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marigold authored and mistercrunch committed Jun 11, 2016
1 parent 4661b02 commit 1631137
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions caravel/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from markdown import markdown
import json
from six import string_types
from werkzeug.datastructures import ImmutableMultiDict
from werkzeug.datastructures import ImmutableMultiDict, MultiDict
from werkzeug.urls import Href
from dateutil import relativedelta as rdelta

Expand Down Expand Up @@ -110,12 +110,13 @@ def get_url(self, **kwargs):
del d['action']
d.update(kwargs)
# Remove unchecked checkboxes because HTML is weird like that
od = OrderedDict()
od = MultiDict()
for key in sorted(d.keys()):
if d[key] is False:
del d[key]
else:
od[key] = d[key]
for v in d.getlist(key):
od.add(key, v)
href = Href(
'/caravel/explore/{self.datasource.type}/'
'{self.datasource.id}/'.format(**locals()))
Expand Down

0 comments on commit 1631137

Please sign in to comment.