mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: internal error on pin/unpin (#4332)
This commit is contained in:
committed by
GitHub
parent
5ec3150e0e
commit
7ed3a12a64
@ -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)
|
||||
|
Reference in New Issue
Block a user