mistercrunch closed pull request #5320: [Fix issue #5319] Update core.py
URL: https://github.com/apache/incubator-superset/pull/5320
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/superset/views/core.py b/superset/views/core.py
index 7c39f1c6d6..9756b5b4a7 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -2499,7 +2499,7 @@ def stop_query(self):
@log_this
def sql_json(self):
"""Runs arbitrary sql and returns and json"""
- async = request.form.get('runAsync') == 'true'
+ async_ = request.form.get('runAsync') == 'true'
sql = request.form.get('sql')
database_id = request.form.get('database_id')
schema = request.form.get('schema') or None
@@ -2535,7 +2535,7 @@ def sql_json(self):
select_as_cta=request.form.get('select_as_cta') == 'true',
start_time=utils.now_as_float(),
tab_name=request.form.get('tab'),
- status=QueryStatus.PENDING if async else QueryStatus.RUNNING,
+ status=QueryStatus.PENDING if async_ else QueryStatus.RUNNING,
sql_editor_id=request.form.get('sql_editor_id'),
tmp_table_name=tmp_table_name,
user_id=int(g.user.get_id()),
@@ -2560,7 +2560,7 @@ def sql_json(self):
'Template rendering failed:
{}'.format(utils.error_msg_from_exception(e)))
# Async request.
- if async:
+ if async_:
logging.info('Running query on a Celery worker')
# Ignore the celery future object and the request may time out.
try:
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]