Skip to content

Commit

Permalink
curious
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Oct 21, 2022
1 parent 04bec5c commit 67c3f20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/sqllab/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def run( # pylint: disable=too-many-statements,useless-suppression
}
except (SupersetErrorsException, SupersetException) as ex:
if ex.status != 422:
query_id = query.id if query else None
query_id = query.id if query else -1
logger.exception("Query %d: %s", query_id, type(ex))
raise ex
except Exception as ex:
query_id = query.id if query else None
query_id = query.id if query else -1
logger.exception("Query %d: %s", query_id, type(ex))
raise SqlLabException(self._execution_context, exception=ex) from ex

Expand Down
1 change: 1 addition & 0 deletions tests/integration_tests/celery_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def test_run_sync_query_dont_exist(test_client, ctas_method):
engine_name = examples_db.db_engine_spec.engine_name
sql_dont_exist = "SELECT name FROM table_dont_exist"
result = run_sql(test_client, sql_dont_exist, cta=True, ctas_method=ctas_method)
print(result)
if backend() == "sqlite" and ctas_method == CtasMethod.VIEW:
assert QueryStatus.SUCCESS == result["status"], result
elif backend() == "presto":
Expand Down

0 comments on commit 67c3f20

Please sign in to comment.