fix: internal error on pin/unpin (#4332)

This commit is contained in:
Viacheslav Potoropin
2025-01-31 06:38:43 +01:00
committed by GitHub
parent 5ec3150e0e
commit 7ed3a12a64
3 changed files with 9 additions and 0 deletions

View File

@ -233,6 +233,9 @@ func (d *DB) UpdateMemo(ctx context.Context, update *store.UpdateMemo) error {
}
set, args = append(set, "payload = "+placeholder(len(args)+1)), append(args, string(payloadBytes))
}
if len(args) == 0 {
return nil
}
stmt := `UPDATE memo SET ` + strings.Join(set, ", ") + ` WHERE id = ` + placeholder(len(args)+1)
args = append(args, update.ID)