From 87ce20bad2cf5ab0f3ed372ce9981b234997ef21 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Mon, 18 Sep 2023 21:43:52 +0200 Subject: [PATCH] Update server/backend/cron/news.go Co-authored-by: Kordian Bruck --- server/backend/cron/news.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/backend/cron/news.go b/server/backend/cron/news.go index b2f1f882..0b571995 100644 --- a/server/backend/cron/news.go +++ b/server/backend/cron/news.go @@ -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")