Browse Source

conditions fix

0x4a52466c696e74 1 tháng trước cách đây
mục cha
commit
28c8859fee
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      rest_gorm/request_list.go

+ 1 - 1
rest_gorm/request_list.go

@@ -46,7 +46,7 @@ func (s *List) Result(pg *gorm.DB, fields rest.FieldNamesList, res any) (count i
 				pg = pg.Or(q, cond.Value)
 			}
 		} else {
-			if cond.Operator != "" && cond.Operator != rest.OperatorNot || cond.Operator != rest.OperatorExists {
+			if cond.Operator != "" && cond.Operator != rest.OperatorNot && cond.Operator != rest.OperatorExists {
 				err = rest.ErrorFiled(cond.Field, "Expected empty operator or not")
 			}
 			if cond.Operator == rest.OperatorExists {