mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +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 {
|
||||
switch tpl.Type {
|
||||
case TemplateTask, TemplateBuild, TemplateDeploy:
|
||||
switch tpl.App {
|
||||
case TemplateAnsible:
|
||||
if tpl.InventoryID == nil {
|
||||
return &ValidationError{"template inventory can not be empty"}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user