1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 15:10:54 +00:00

fix bug of newer error

This commit is contained in:
chenzhiming 2016-07-20 20:49:09 +08:00
parent ddc5da6a38
commit acf35e9151
3 changed files with 3 additions and 3 deletions

View File

@ -1099,7 +1099,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
var l []{{modelName}} var l []{{modelName}}
qs = qs.OrderBy(sortFields...) qs = qs.OrderBy(sortFields...)
if _, err := qs.Limit(limit, offset).All(&l, fields...); err == nil { if _, err = qs.Limit(limit, offset).All(&l, fields...); err == nil {
if len(fields) == 0 { if len(fields) == 0 {
for _, v := range l { for _, v := range l {
ml = append(ml, v) ml = append(ml, v)

View File

@ -260,7 +260,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
var l []{{modelName}} var l []{{modelName}}
qs = qs.OrderBy(sortFields...) qs = qs.OrderBy(sortFields...)
if _, err := qs.Limit(limit, offset).All(&l, fields...); err == nil { if _, err = qs.Limit(limit, offset).All(&l, fields...); err == nil {
if len(fields) == 0 { if len(fields) == 0 {
for _, v := range l { for _, v := range l {
ml = append(ml, v) ml = append(ml, v)

View File

@ -202,7 +202,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
var l []{{modelName}} var l []{{modelName}}
qs = qs.OrderBy(sortFields...) qs = qs.OrderBy(sortFields...)
if _, err := qs.Limit(limit, offset).All(&l, fields...); err == nil { if _, err = qs.Limit(limit, offset).All(&l, fields...); err == nil {
if len(fields) == 0 { if len(fields) == 0 {
for _, v := range l { for _, v := range l {
ml = append(ml, v) ml = append(ml, v)