Skip to content

Commit

Permalink
修复 doris工单异常情况下的展示逻辑,修改帮助页跳转方式
Browse files Browse the repository at this point in the history
修复 doris工单异常情况下的展示逻辑:
  File "/opt/archery/sql/engines/starrocks.py", line 291, in execute
    affected_rows=effect_row,
UnboundLocalError: local variable 'effect_row' referenced before assignment
  • Loading branch information
Grain-Yu committed Nov 8, 2023
1 parent aa91863 commit 3ade918
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ <h4 class="modal-title" id="myModalLabel">注册账号</h4>
</div>
</div>
<div class="modal-footer">
<a href={{ register_help }} class="btn btn-default" role="button"><u>需要帮助</u></a>
<a href={{ register_help }} target="_blank" class="btn btn-default" role="button"><u>需要帮助</u></a>
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button id="btnSign" type="submit" class="btn btn-success">注册</button>
</div>
Expand Down
3 changes: 2 additions & 1 deletion sql/engines/starrocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def execute(self, db_name=None, sql="", close_conn=True):
execute_result = ReviewSet(full_sql=sql)
conn = self.get_connection(db_name=db_name)
rowid = 1
effect_row = 0
sql_list = sqlparse.split(sql)
for statement in sql_list:
try:
Expand Down Expand Up @@ -298,7 +299,7 @@ def execute(self, db_name=None, sql="", close_conn=True):
for statement in sql_list[rowid:]:
execute_result.rows.append(
ReviewResult(
id=rowid,
id=rowid + 1,
errlevel=2,
stagestatus="Audit Completed",
errormessage="前序语句失败, 未执行",
Expand Down

0 comments on commit 3ade918

Please sign in to comment.