Backend: Fix panic in File.Save()

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-05-18 17:57:40 +02:00
parent 7f2b13bf71
commit f057880df3

View File

@ -151,7 +151,9 @@ func (m *File) Save() error {
return err
}
return Db().Model(m).Related(Photo{}).Error
photo := Photo{}
return Db().Model(m).Related(&photo).Error
}
// UpdateVideoInfos updates related video infos based on this file.