mirror of
https://github.com/beego/bee.git
synced 2024-11-25 15:00:55 +00:00
isnull filter needs boolean value for the Filter function
With changes suggested by @amrfaissal
This commit is contained in:
parent
9aaade6cbb
commit
fb93677604
@ -1038,8 +1038,12 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
|
||||
for k, v := range query {
|
||||
// rewrite dot-notation to Object__Attribute
|
||||
k = strings.Replace(k, ".", "__", -1)
|
||||
if strings.Contains(k, "isnull") {
|
||||
qs = qs.Filter(k, (v == "true" || v == "1"))
|
||||
} else {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
// order by:
|
||||
var sortFields []string
|
||||
if len(sortby) != 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user