Skip to content

Commit

Permalink
Fix typo in deleteUser (go-gitea#3781)
Browse files Browse the repository at this point in the history
num_watches was used where num_stars should have been used.
  • Loading branch information
michaelkuhn authored and appleboy committed Apr 10, 2018
1 parent 38a9cda commit f321980
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 *****
Expand Down

0 comments on commit f321980

Please sign in to comment.