From 31c0a338d6e7eaa9cb2c4aea0126d383251f2fa5 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Wed, 11 Apr 2018 05:24:46 +0200 Subject: [PATCH] Fix typo in deleteUser (#3781) (#3783) num_watches was used where num_stars should have been used. --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/user.go b/models/user.go index 8f2ec547c..af978dc56 100644 --- a/models/user.go +++ b/models/user.go @@ -934,7 +934,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 *****