Skip to content

Commit

Permalink
remove invalid condition, it is always true
Browse files Browse the repository at this point in the history
  • Loading branch information
sjjian committed Dec 3, 2021
1 parent fe45fe4 commit 0c95258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqle/model/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (s *Storage) CreateRulesIfNotExist(rules map[string][]*driver.Rule) error {
// 2. rule no params in db, and has params in code.
existedRuleHasParams := existedRule.Params != nil && len(existedRule.Params.Params) > 0
ruleHasParams := len(rule.Params) > 0
if !exist || (!existedRuleHasParams && ruleHasParams) {
if !existedRuleHasParams && ruleHasParams {
err := s.Save(GenerateRuleByDriverRule(rule, dbType))
if err != nil {
return err
Expand Down

0 comments on commit 0c95258

Please sign in to comment.