Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在自动审核模式中,上线工单存在检测错误或警告时,并匹配auto_rwview_wrong参数时,工单状态应为自动审核不通过;在客户端JS脚本中增加脚本错误数的判断 #2692

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sql/templates/sqlsubmit.html
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,10 @@ <h4 class="modal-title text-danger">提交信息确认</h4>
sessionStorage.setItem('CheckWarningCount', result.warning_count);
sessionStorage.setItem('CheckErrorCount', result.error_count);
$("#inception-result").show();
$('#btn-submitsql').button('reset').removeClass('disabled').prop("disabled", false);
// 是前端拦截了还是允许进入工作流?
LeoQuote marked this conversation as resolved.
Show resolved Hide resolved
//if (result.error_count==0) {
$('#btn-submitsql').button('reset').removeClass('disabled').prop("disabled", false);
//}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
if (XMLHttpRequest.responseJSON) {
Expand Down
6 changes: 4 additions & 2 deletions sql/utils/workflow_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,12 @@ def is_auto_review(self) -> bool:

def generate_audit_setting(self) -> AuditSetting:
if self.is_auto_review():
return AuditSetting(auto_pass=True)
if self.workflow_type in [WorkflowType.SQL_REVIEW, WorkflowType.QUERY]:
if self.workflow.status != "workflow_autoreviewwrong":
return AuditSetting(auto_pass=True)

if self.workflow_type in [WorkflowType.SQL_REVIEW, WorkflowType.QUERY]:
group_id = self.workflow.group_id

else:
# ArchiveConfig
group_id = self.resource_group_id
Expand Down
Loading