diff options
author | Michael Kuhn <suraia@ikkoku.de> | 2018-04-10 14:39:01 +0200 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2018-04-10 20:39:01 +0800 |
commit | f321980a32206a371964327a0a09d2638f00eb99 (patch) | |
tree | f1da16a51c67664e7d71d3065e9467e27bb16c3b /models | |
parent | 38a9cda4bbcddff59c856d42de714b6764887fde (diff) | |
download | gitea-f321980a32206a371964327a0a09d2638f00eb99.tar.gz gitea-f321980a32206a371964327a0a09d2638f00eb99.zip |
Fix typo in deleteUser (#3781)
num_watches was used where num_stars should have been used.
Diffstat (limited to 'models')
-rw-r--r-- | models/user.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go index fa41deec92..aab1e99f0e 100644 --- a/models/user.go +++ b/models/user.go @@ -935,7 +935,7 @@ func deleteUser(e *xorm.Session, u *User) error { if err = e.Table("star").Cols("star.repo_id"). Where("star.uid = ?", u.ID).Find(&starredRepoIDs); err != nil { return fmt.Errorf("get all stars: %v", err) - } else if _, err = e.Decr("num_watches").In("id", starredRepoIDs).Update(new(Repository)); err != nil { + } else if _, err = e.Decr("num_stars").In("id", starredRepoIDs).Update(new(Repository)); err != nil { return fmt.Errorf("decrease repository num_stars: %v", err) } // ***** END: Star ***** |