From 1fe1af2ce93e4b5c607f2bdccfa16a1f734cb504 Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Mon, 15 Feb 2016 11:58:14 -0600 Subject: [PATCH] Fixing bug that doesn't allow attachments to be created. Fixes #151 --- models/template.go | 1 + 1 file changed, 1 insertion(+) diff --git a/models/template.go b/models/template.go index cb5f12a6..c6027cc6 100644 --- a/models/template.go +++ b/models/template.go @@ -82,6 +82,7 @@ func GetTemplateByName(n string, uid int64) (Template, error) { err := db.Where("user_id=? and name=?", uid, n).Find(&t).Error if err != nil { Logger.Println(err) + return t, err } err = db.Where("template_id=?", t.Id).Find(&t.Attachments).Error if err != nil && err != gorm.RecordNotFound {