Skip to content

Commit 3d5f31f

Browse files
lunnyzeripath
authored andcommitted
Fix SetExpr failed (#9506)
1 parent 2401779 commit 3d5f31f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

models/update.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ func pushUpdateDeleteTags(e Engine, repo *Repository, tags []string) error {
103103
if _, err := e.
104104
Where("repo_id = ? AND is_tag = ?", repo.ID, false).
105105
In("lower_tag_name", lowerTags).
106-
SetExpr("is_draft", true).
107-
SetExpr("num_commits", 0).
108-
SetExpr("sha1", "").
109-
Update(new(Release)); err != nil {
106+
Cols("is_draft", "num_commits", "sha1").
107+
Update(&Release{
108+
IsDraft: true,
109+
}); err != nil {
110110
return fmt.Errorf("Update: %v", err)
111111
}
112112

0 commit comments

Comments
 (0)