Browse Source

list null

0x4a52466c696e74 2 months ago
parent
commit
c30684d8c6
1 changed files with 2 additions and 0 deletions
  1. 2 0
      rest_gorm/request_list.go

+ 2 - 0
rest_gorm/request_list.go

@@ -2,6 +2,7 @@ package rest_gorm
 
 import (
 	"fmt"
+	"log"
 
 	"git.ali33.ru/fcg-xvii/rest"
 	"gorm.io/gorm"
@@ -36,6 +37,7 @@ func (s *List) Result(pg *gorm.DB, fields rest.FieldNamesList, res any) (count i
 			err = rest.ErrorFiled(cond.Field, "Unexpected field")
 			return
 		}
+		log.Println("CV", cond.Value)
 		if cond.Value == nil {
 			q := fmt.Sprintf("%s %s ?", CamelToSnake(cond.Field), cond.Operator)
 			if i == 0 || cond.Logic == rest.LogicAND {