Skip to content

Commit

Permalink
what is your why
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed Jun 26, 2023
1 parent 8d8b75a commit 2f3a677
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions database/schedule/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ func (e *engine) UpdateSchedule(s *library.Schedule, fields bool) error {
}

// If "fields" is true, update entire record; otherwise, just update scheduled_at (part of processSchedule)
//
// we do this because Gorm will automatically set `updated_at` with the Save function
// and the `updated_at` field should reflect the last time a user updated the record, rather than the scheduler
if fields {
err = e.client.Table(constants.TableSchedule).Save(schedule).Error
} else {
Expand Down

0 comments on commit 2f3a677

Please sign in to comment.