Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missing multiple values for the same parameter name #565

Merged
merged 1 commit into from
Jun 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions caravel/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from markdown import markdown
from pandas.io.json import dumps
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 @@ -113,12 +113,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