Skip to content

Commit

Permalink
Update server/backend/cron/news.go
Browse files Browse the repository at this point in the history
Co-authored-by: Kordian Bruck <[email protected]>
  • Loading branch information
CommanderStorm and kordianbruck authored Sep 18, 2023
1 parent 7dbfcc5 commit 87ce20b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/backend/cron/news.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (c *CronService) parseNewsFeed(source model.NewsSource) error {
func (c *CronService) saveImage(url string) (*model.Files, error) {
targetFileName := fmt.Sprintf("%x.jpg", md5.Sum([]byte(url)))
file := model.Files{
Name: targetFileName,
Name: targetFileName, // path intentionally omitted
}
if err := c.db.First(&file).Error; err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
log.WithError(err).WithField("targetFileName", targetFileName).Error("Couldn't query database for file")
Expand Down

0 comments on commit 87ce20b

Please sign in to comment.