瀏覽代碼

Merge pull request #826 from jmorganca/mxyng/template-system

show: no template system if empty
Michael Yang 1 年之前
父節點
當前提交
940e8ebec3
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      server/images.go

+ 3 - 0
server/images.go

@@ -951,7 +951,10 @@ func ShowModelfile(model *Model) (string, error) {
 
 FROM {{ .From }}
 TEMPLATE """{{ .Template }}"""
+
+{{- if .System }}
 SYSTEM """{{ .System }}"""
+{{- end }}
 {{ .Params }}
 `
 	for _, l := range mt.Model.AdapterPaths {