Skip to content

Commit

Permalink
tested differnt way of setting feedback to processed
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Nov 23, 2023
1 parent daf1fb5 commit 39ee850
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/backend/cron/feedback_email.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ func (c *CronService) feedbackEmailCron() error {
log.Tracef("sending feedback %d to %v successfull", i, feedback.Recipient)

// prevent the message being send the next time around
if err := c.db.Find(model.Feedback{}, "id = ?", feedback.Id).Update("processed", true).Error; err != nil {
feedback.Processed = true
if err := c.db.Save(&feedback).Error; err != nil {
log.WithError(err).Error("could not prevent mail from being send again")
}
}
Expand Down

0 comments on commit 39ee850

Please sign in to comment.