diff --git a/db/bolt/task.go b/db/bolt/task.go index 288fb408..4c98f7a9 100644 --- a/db/bolt/task.go +++ b/db/bolt/task.go @@ -57,9 +57,9 @@ func (d *BoltDb) getTasks(projectID int, templateID *int, params db.RetrieveQuer tpl, ok := templates[task.TemplateID] if !ok { if templateID == nil { - tpl, _ = d.GetTemplate(task.ProjectID, task.TemplateID) + tpl, _ = d.getRawTemplate(task.ProjectID, task.TemplateID) } else { - tpl, _ = d.GetTemplate(task.ProjectID, *templateID) + tpl, _ = d.getRawTemplate(task.ProjectID, *templateID) } templates[task.TemplateID] = tpl } diff --git a/db/bolt/template.go b/db/bolt/template.go index 6a3f34d5..c4b739a6 100644 --- a/db/bolt/template.go +++ b/db/bolt/template.go @@ -59,8 +59,13 @@ func (d *BoltDb) GetTemplates(projectID int, filter db.TemplateFilter, params db return } -func (d *BoltDb) GetTemplate(projectID int, templateID int) (template db.Template, err error) { +func (d *BoltDb) getRawTemplate(projectID int, templateID int) (template db.Template, err error) { err = d.getObject(projectID, db.TemplateProps, intObjectID(templateID), &template) + return +} + +func (d *BoltDb) GetTemplate(projectID int, templateID int) (template db.Template, err error) { + template, err = d.getRawTemplate(projectID, templateID) if err != nil { return }