浏览代码

check value against nil

Alexander Belanger 5 年之前
父节点
当前提交
04c2a37f45
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      internal/templater/parser/parser.go

+ 1 - 1
internal/templater/parser/parser.go

@@ -130,7 +130,7 @@ func formToLookupTable(def *ClientConfigDefault, form *models.FormYAML) map[*mod
 
 
 				fmt.Printf("PARSER: content value %v, variable %s\n", content.Value, content.Variable)
 				fmt.Printf("PARSER: content value %v, variable %s\n", content.Value, content.Variable)
 
 
-				if fmt.Sprintf("%v", content.Value) != "" {
+				if content.Value != nil && fmt.Sprintf("%v", content.Value) != "" {
 					// TODO -- case on whether value is proper query string, if not resolve it to a
 					// TODO -- case on whether value is proper query string, if not resolve it to a
 					// proper query string
 					// proper query string
 					query, err := utils.NewQuery(
 					query, err := utils.NewQuery(