mirror of
https://github.com/beego/bee.git
synced 2024-11-22 05:00:54 +00:00
fix bug of newer error
This commit is contained in:
parent
ddc5da6a38
commit
acf35e9151
@ -1099,7 +1099,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
|
||||
|
||||
var l []{{modelName}}
|
||||
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 {
|
||||
for _, v := range l {
|
||||
ml = append(ml, v)
|
||||
|
@ -260,7 +260,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
|
||||
|
||||
var l []{{modelName}}
|
||||
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 {
|
||||
for _, v := range l {
|
||||
ml = append(ml, v)
|
||||
|
@ -202,7 +202,7 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
|
||||
|
||||
var l []{{modelName}}
|
||||
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 {
|
||||
for _, v := range l {
|
||||
ml = append(ml, v)
|
||||
|
Loading…
Reference in New Issue
Block a user