feat: bi报错信息完善

This commit is contained in:
caoqianming 2024-01-30 17:45:53 +08:00
parent 83da22160f
commit f050a335cc
1 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ class DatasetViewSet(CustomModelViewSet):
if dt.sql_query:
try:
sql_f_ = check_sql_safe(dt.sql_query.format(**query))
except KeyError:
except KeyError as e:
if is_test and dt.default_param:
new_query = dt.default_param
new_query.update(query)
@ -84,7 +84,7 @@ class DatasetViewSet(CustomModelViewSet):
except KeyError:
raise ParseError('需指定查询参数')
else:
raise ParseError('需指定查询参数')
raise ParseError(f'需指定查询参数_{str(e)}')
sql_f_strip = sql_f_.strip(';')
sql_f_l = sql_f_strip.split(';')
hash_k = hash(sql_f_strip)