1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 17:30:53 +00:00
This commit is contained in:
Ming Deng 2020-11-10 23:30:24 +08:00
parent 2a6fadb9ae
commit 0b3bcbd3ec

View File

@ -76,10 +76,13 @@ func (c Condition) AndNot(expr string, args ...interface{}) *Condition {
// AndCond combine a condition to current condition
func (c *Condition) AndCond(cond *Condition) *Condition {
c = c.clone()
if c == cond {
panic(fmt.Errorf("<Condition.AndCond> cannot use self as sub cond"))
}
c = c.clone()
if cond != nil {
c.params = append(c.params, condValue{cond: cond, isCond: true})
}