Skip to content

Commit d132f84

Browse files
committed
Change db.Exec to Update method
1 parent 388533f commit d132f84

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

services/projects/issue.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ func MoveIssuesOnProjectColumn(ctx context.Context, doer *user_model.User, colum
7777
}
7878
}
7979

80-
_, err = db.Exec(ctx, "UPDATE `project_issue` SET project_board_id=?, sorting=? WHERE issue_id=? AND project_id=?", column.ID, sorting, issueID, column.ProjectID)
80+
_, err = db.GetEngine(ctx).Table("project_issue").
81+
Where("issue_id = ? AND project_id = ?", issueID, column.ProjectID).
82+
Update(map[string]any{
83+
"project_board_id": column.ID,
84+
"sorting": sorting,
85+
})
8186
if err != nil {
8287
return err
8388
}

0 commit comments

Comments
 (0)