Skip to content

Commit

Permalink
Introducing support for pre-depercate_v1 URL scheme (#2267)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Feb 25, 2017
1 parent ec1f022 commit 3de2698
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions superset/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
appbuilder, cache, db, models, viz, utils, app,
sm, sql_lab, sql_parse, results_backend, security,
)
from superset.legacy import cast_form_data
from superset.utils import has_access
from superset.source_registry import SourceRegistry
from superset.models import DatasourceAccessRequest as DAR
Expand Down Expand Up @@ -1466,10 +1467,14 @@ def clean_fulfilled_requests(session):
def get_form_data(self):
form_data = request.args.get("form_data")
if not form_data:
# Supporting POST as well as get
form_data = request.form.get("form_data")
if not form_data:
form_data = '{}'
d = json.loads(form_data)
if form_data:
d = json.loads(form_data)
elif request.args.get("viz_type"):
# Converting old URLs
d = cast_form_data(request.args.to_dict())

extra_filters = request.args.get("extra_filters")
filters = d.get('filters', [])
if extra_filters:
Expand Down

0 comments on commit 3de2698

Please sign in to comment.