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

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