EUGENIO SOUZA CARVALHO 4 年之前
父節點
當前提交
6234cab41c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      common/models.go

+ 2 - 2
common/models.go

@@ -457,7 +457,7 @@ var (
 			var (
 				acceptValues       = accept.([]interface{})
 				acceptValuesString = []string{}
-				value              = input.(string)
+				value              = fmt.Sprintf("%v", input)
 			)
 
 			for _, acceptValue := range acceptValues {
@@ -478,7 +478,7 @@ var (
 		"reject": func(input interface{}, reject interface{}) *errs.Error {
 			var (
 				rejectValues = reject.([]interface{})
-				value        = input.(string)
+				value        = fmt.Sprintf("%v", input)
 			)
 
 			for _, rejectValue := range rejectValues {