From 87e2237f5b054bec9fcb17701b4f7b1fe93b6ff8 Mon Sep 17 00:00:00 2001 From: "Ronnie A. Baez Sesto" Date: Wed, 16 Nov 2016 15:31:10 -0400 Subject: [PATCH] isnull filter needs boolean value for the Filter function --- g_appcode.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/g_appcode.go b/g_appcode.go index 4e90107..6bd915f 100644 --- a/g_appcode.go +++ b/g_appcode.go @@ -1062,7 +1062,15 @@ 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) - qs = qs.Filter(k, v) + if strings.Contains(k, "isnull") { + var v2 bool + if v == "true" || v == "1" { + v2 = true + } + qs = qs.Filter(k, v2) + } else { + qs = qs.Filter(k, v) + } } // order by: var sortFields []string