Fix csv download. (#2036)

This commit is contained in:
Bogdan
2017-01-25 18:06:29 -08:00
committed by GitHub
parent c5c730224e
commit b1bba96d04
4 changed files with 20 additions and 12 deletions

View File

@@ -101,9 +101,10 @@ def get_sql_results(self, query_id, return_results=True, store_results=False):
logging.exception(e)
msg = "Template rendering failed: " + utils.error_msg_from_exception(e)
handle_error(msg)
query.executed_sql = executed_sql
logging.info("Running query: \n{}".format(executed_sql))
try:
query.executed_sql = executed_sql
logging.info("Running query: \n{}".format(executed_sql))
result_proxy = engine.execute(query.executed_sql, schema=query.schema)
except Exception as e:
logging.exception(e)