minor fixes

This commit is contained in:
Qiu Jian
2020-03-27 01:20:30 +08:00
parent d0e4cec332
commit 329edbae22
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ func mustCheckModelManager(modelMan IModelManager) {
if !ok {
continue
}
if !utils.IsInStringArray(v, allowedValues) {
if len(v) > 0 && !utils.IsInStringArray(v, allowedValues) {
msg := fmt.Sprintf("model manager %s: column %s has invalid tag %s:\"%s\", expecting %v",
modelMan.KeywordPlural(), col.Name(), tagName, v, allowedValues)
panic(msg)