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

Introducing support for pre-depercate_v1 URL scheme #2267

Merged
merged 1 commit into from
Feb 25, 2017
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
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