1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 07:50:49 +00:00

Revert spaces > tabs change

This commit is contained in:
Pelle Johnsen 2015-08-24 09:41:10 +02:00
parent 19d82ab62c
commit 0c33673197

View File

@ -122,21 +122,21 @@ func (o querySet) Distinct() QuerySeter {
// set relation model to query together.
// it will query relation models and assign to parent model.
func (o querySet) RelatedSel(params ...interface{}) QuerySeter {
if len(params) == 0 {
o.relDepth = DefaultRelsDepth
} else {
for _, p := range params {
switch val := p.(type) {
case string:
o.related = append(o.related, val)
case int:
o.relDepth = val
default:
panic(fmt.Errorf("<QuerySeter.RelatedSel> wrong param kind: %v", val))
}
}
}
return &o
if len(params) == 0 {
o.relDepth = DefaultRelsDepth
} else {
for _, p := range params {
switch val := p.(type) {
case string:
o.related = append(o.related, val)
case int:
o.relDepth = val
default:
panic(fmt.Errorf("<QuerySeter.RelatedSel> wrong param kind: %v", val))
}
}
}
return &o
}
// set condition to QuerySeter.