diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-12-27 22:18:07 +0800 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-12-27 14:18:07 +0000 |
commit | 3d5f31f77d3f56a954b267fa05f5757c6e538b4e (patch) | |
tree | 7965badbd1253a500c43e227465691ddc14802af | |
parent | 2401779aac7fae0b055e3caf4dddf109425db4bc (diff) | |
download | gitea-3d5f31f77d3f56a954b267fa05f5757c6e538b4e.tar.gz gitea-3d5f31f77d3f56a954b267fa05f5757c6e538b4e.zip |
Fix SetExpr failed (#9506)
-rw-r--r-- | models/update.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/update.go b/models/update.go index 1105c9a828..b6c04bd515 100644 --- a/models/update.go +++ b/models/update.go @@ -103,10 +103,10 @@ func pushUpdateDeleteTags(e Engine, repo *Repository, tags []string) error { if _, err := e. Where("repo_id = ? AND is_tag = ?", repo.ID, false). In("lower_tag_name", lowerTags). - SetExpr("is_draft", true). - SetExpr("num_commits", 0). - SetExpr("sha1", ""). - Update(new(Release)); err != nil { + Cols("is_draft", "num_commits", "sha1"). + Update(&Release{ + IsDraft: true, + }); err != nil { return fmt.Errorf("Update: %v", err) } |