mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
Fixing multi value parsing on old URL (#2277)
This commit is contained in:
parent
ea72c6b018
commit
ed2935ec69
@ -63,8 +63,11 @@ def cast_form_data(form_data):
|
||||
elif v and ft == 'TextField' and field_config.get('isFloat'):
|
||||
v = float(v) if v != '' else None
|
||||
elif v and ft == 'SelectField':
|
||||
if field_config.get('multi') and not isinstance(v, list):
|
||||
v = [v]
|
||||
if field_config.get('multi'):
|
||||
if type(form_data).__name__ == 'ImmutableMultiDict':
|
||||
v = form_data.getlist(k)
|
||||
elif not isinstance(v, list):
|
||||
v = [v]
|
||||
if d.get('slice_id'):
|
||||
d['slice_id'] = int(d['slice_id'])
|
||||
|
||||
|
@ -1478,7 +1478,7 @@ class Superset(BaseSupersetView):
|
||||
|
||||
if request.args.get("viz_type"):
|
||||
# Converting old URLs
|
||||
d = cast_form_data(request.args.to_dict())
|
||||
d = cast_form_data(request.args)
|
||||
|
||||
extra_filters = request.args.get("extra_filters")
|
||||
filters = d.get('filters', [])
|
||||
|
Loading…
Reference in New Issue
Block a user