Skip to content

Commit

Permalink
fixed a wrong id name causing db errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Mar 10, 2024
1 parent 3fa3344 commit 354234b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/backend/cron/dish_name_download.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ func downloadDailyDishes(c *CronService) {
var dishId int64
if err := c.db.Model(&model.Dish{}).
Where("name = ? AND cafeteriaID = ?", dish.Name, dish.CafeteriaID).
Select("CanteenDish").First(&dishId).
Select("dish").
First(&dishId).
Count(&count).Error; err != nil {
log.WithError(err).Error("Error while checking whether this is already in database")
}
Expand Down

0 comments on commit 354234b

Please sign in to comment.