mirror of https://github.com/gophish/gophish
Fixing bug that doesn't allow attachments to be created. Fixes #151
parent
3d9e447992
commit
1fe1af2ce9
|
@ -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…
Reference in New Issue