Skip to content

Commit

Permalink
d is not defined, fix (#2270)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alanna Scott authored Feb 25, 2017
1 parent 8758296 commit 6e1901e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions superset/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1465,13 +1465,18 @@ def clean_fulfilled_requests(session):
return redirect('/accessrequestsmodelview/list/')

def get_form_data(self):
form_data = request.args.get("form_data")
if not form_data:
# get form data from url
if request.args.get("form_data"):
form_data = request.args.get("form_data")
elif request.form.get("form_data"):
# Supporting POST as well as get
form_data = request.form.get("form_data")
if form_data:
d = json.loads(form_data)
elif request.args.get("viz_type"):
else:
form_data = '{}'

d = json.loads(form_data)

if request.args.get("viz_type"):
# Converting old URLs
d = cast_form_data(request.args.to_dict())

Expand Down

0 comments on commit 6e1901e

Please sign in to comment.