Skip to content

Commit

Permalink
reject改为should_reject,增加可读性
Browse files Browse the repository at this point in the history
  • Loading branch information
peixubin committed Jul 2, 2024
1 parent 687ff43 commit 74d0c1c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sql/utils/workflow_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ def generate_audit_setting(self) -> AuditSetting:
if auto_review_wrong == "":
auto_review_wrong = "2"
auto_review_wrong = int(auto_review_wrong)
reject = False
should_reject = False
if self.max_errlevel == 1 and auto_review_wrong == 1:
reject = True
should_reject = True
elif self.max_errlevel == 2 and auto_review_wrong in (1, 2):
reject = True
if auto_review and not reject:
should_reject = True
if auto_review and not should_reject:
return AuditSetting(auto_pass=True)
if self.workflow_type in [WorkflowType.SQL_REVIEW, WorkflowType.QUERY]:
group_id = self.workflow.group_id
Expand Down

0 comments on commit 74d0c1c

Please sign in to comment.