Check template type

This commit is contained in:
Prakyath Raj 2024-05-24 00:35:04 +05:30
parent fcc32bac34
commit 4ded69c065

View File

@ -8,6 +8,7 @@ import (
"strconv"
"text/template"
"github.com/ansible-semaphore/semaphore/db"
"github.com/ansible-semaphore/semaphore/pkg/task_logger"
"github.com/ansible-semaphore/semaphore/util"
"github.com/ansible-semaphore/semaphore/util/mailer"
@ -364,7 +365,7 @@ func (t *TaskRunner) alertInfos() (string, string) {
if t.Task.Version != nil {
version = *t.Task.Version
} else if t.Task.GetIncomingVersion(t.pool.store) != nil {
} else if t.Template.Type != db.TemplateTask {
version = "build " + *t.Task.GetIncomingVersion(t.pool.store)
} else {
version = ""