Skip to content

Commit

Permalink
fix node expire error due to type in gorm model Update (#1692)
Browse files Browse the repository at this point in the history
Fixes #1674

Signed-off-by: fortitude.zhang <fortitude.zhang@gmail.com>
  • Loading branch information
fortitudepub committed Jan 21, 2024
1 parent 1e22f17 commit a369d57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hscontrol/db/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ func (hsdb *HSDatabase) ExpireExpiredNodes(lastCheck time.Time) time.Time {
// Do not use setNodeExpiry as that has a notifier hook, which
// can cause a deadlock, we are updating all changed nodes later
// and there is no point in notifiying twice.
if err := hsdb.db.Model(nodes[index]).Updates(types.Node{
if err := hsdb.db.Model(&nodes[index]).Updates(types.Node{
Expiry: &started,
}).Error; err != nil {
log.Error().
Expand Down

0 comments on commit a369d57

Please sign in to comment.