fix: generate sql incorrect when use soft_delete and only one OR

This commit is contained in:
longlihale 2021-12-30 11:44:44 +08:00
parent 8846f34747
commit 9b193081ec

View File

@ -95,11 +95,9 @@ func And(exprs ...Expression) Expression {
} }
if len(exprs) == 1 { if len(exprs) == 1 {
if _, ok := exprs[0].(OrConditions); !ok { if _, ok := exprs[0].(OrConditions); !ok {
return exprs[0] return exprs[0]
} }
} }
return AndConditions{Exprs: exprs} return AndConditions{Exprs: exprs}