mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 23:39:56 +01:00
fix: use app instead of type for validating template
This commit is contained in:
parent
f93969f340
commit
7fdcf63f13
@ -84,8 +84,8 @@ type Template struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (tpl *Template) Validate() error {
|
func (tpl *Template) Validate() error {
|
||||||
switch tpl.Type {
|
switch tpl.App {
|
||||||
case TemplateTask, TemplateBuild, TemplateDeploy:
|
case TemplateAnsible:
|
||||||
if tpl.InventoryID == nil {
|
if tpl.InventoryID == nil {
|
||||||
return &ValidationError{"template inventory can not be empty"}
|
return &ValidationError{"template inventory can not be empty"}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user