mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 19:30:55 +00:00
Fix 4298
This commit is contained in:
parent
2a6fadb9ae
commit
0b3bcbd3ec
@ -76,10 +76,13 @@ func (c Condition) AndNot(expr string, args ...interface{}) *Condition {
|
|||||||
|
|
||||||
// AndCond combine a condition to current condition
|
// AndCond combine a condition to current condition
|
||||||
func (c *Condition) AndCond(cond *Condition) *Condition {
|
func (c *Condition) AndCond(cond *Condition) *Condition {
|
||||||
c = c.clone()
|
|
||||||
if c == cond {
|
if c == cond {
|
||||||
panic(fmt.Errorf("<Condition.AndCond> cannot use self as sub cond"))
|
panic(fmt.Errorf("<Condition.AndCond> cannot use self as sub cond"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c = c.clone()
|
||||||
|
|
||||||
if cond != nil {
|
if cond != nil {
|
||||||
c.params = append(c.params, condValue{cond: cond, isCond: true})
|
c.params = append(c.params, condValue{cond: cond, isCond: true})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user