Skip to content

Commit

Permalink
simplify code to get parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
whummer committed Jun 13, 2016
1 parent 011ca74 commit a045d7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redash/handlers/embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def embed(query_id, visualization_id, org_slug=None):
# WARNING: Note that the external query parameters
# are a potential risk of SQL injections.
#
max_age = int(request.args['maxAge']) if 'maxAge' in request.args else 0
max_age = int(request.args.get('maxAge', 0))
results = run_query_sync(query.data_source, parameter_values, query.query, max_age=max_age)
if results is None:
abort(400, message="Unable to get results for this query")
Expand Down

0 comments on commit a045d7d

Please sign in to comment.