Browse Source

Fixing bug that doesn't allow attachments to be created. Fixes #151

pull/157/head
Jordan Wright 5 years ago
parent
commit
1fe1af2ce9
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      models/template.go

+ 1
- 0
models/template.go View File

@ -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 {

Loading…
Cancel
Save