Update Template.go

This commit is contained in:
Bjarne Roß 2023-06-13 11:53:37 +02:00 committed by GitHub
parent 75682fb1d4
commit 763bd6e562
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,7 @@ func FillTemplate(d Store, template *Template) (err error) {
var tasks []TaskWithTpl
if err != nil {
return
tasks, err = d.GetTemplateTasks(tpl.ProjectID, tpl.ID, RetrieveQueryParams{Count: 1})
tasks, err = d.GetTemplateTasks(template.ProjectID, template.ID, RetrieveQueryParams{Count: 1})
}
if len(tasks) > 0 {
template.LastTask = &tasks[0]