mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
Prevent alarming users with stacktrace when using sqlite
This commit is contained in:
parent
e71596dc45
commit
e2b572d9e2
@ -23,7 +23,7 @@ def upgrade():
|
||||
op.create_unique_constraint(None, 'dbs', ['verbose_name'])
|
||||
op.create_unique_constraint(None, 'clusters', ['verbose_name'])
|
||||
except Exception as e:
|
||||
logging.exception(e)
|
||||
logging.info('Constraint not created, expected when using sqlite')
|
||||
|
||||
|
||||
def downgrade():
|
||||
|
@ -109,6 +109,8 @@ def get_sql_results(self, query_id, return_results=True, store_results=False):
|
||||
conn = engine.raw_connection()
|
||||
cursor = conn.cursor()
|
||||
try:
|
||||
print(query.executed_sql)
|
||||
logging.info(query.executed_sql)
|
||||
cursor.execute(
|
||||
query.executed_sql, **db_engine_spec.cursor_execute_kwargs)
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user