Skip to content

Commit

Permalink
Fix invalid SQL when updating preset
Browse files Browse the repository at this point in the history
It tried to set the shortcut column as well, which it didn't actually
have a parameter for.
  • Loading branch information
askmeaboutlo0m committed Oct 14, 2024
1 parent 019572c commit 1621e11
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/libclient/brushes/brushpresetmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,10 @@ class BrushPresetTagModel::Private {
if(exec(
query,
QStringLiteral(
"update preset set name = ?, description = ?, "
"thumbnail = ?, type = ?, data = ?, shortcut = ?, "
"changed_name = null, changed_description = null, "
"changed_thumbnail = null, changed_type = null, "
"changed_data = null where id = ?"),
"update preset set name = ?, description = ?, thumbnail = "
"?, type = ?, data = ?, changed_name = null, "
"changed_description = null, changed_thumbnail = null, "
"changed_type = null, changed_data = null where id = ?"),
{nonNullString(name), nonNullString(description), thumbnail,
type, data, id})) {
return query.numRowsAffected() == 1;
Expand Down

0 comments on commit 1621e11

Please sign in to comment.