Skip to content

Commit 31c0a33

Browse files
michaelkuhnlunny
authored andcommitted
Fix typo in deleteUser (#3781) (#3783)
num_watches was used where num_stars should have been used.
1 parent 2ec85e0 commit 31c0a33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ func deleteUser(e *xorm.Session, u *User) error {
934934
if err = e.Table("star").Cols("star.repo_id").
935935
Where("star.uid = ?", u.ID).Find(&starredRepoIDs); err != nil {
936936
return fmt.Errorf("get all stars: %v", err)
937-
} else if _, err = e.Decr("num_watches").In("id", starredRepoIDs).Update(new(Repository)); err != nil {
937+
} else if _, err = e.Decr("num_stars").In("id", starredRepoIDs).Update(new(Repository)); err != nil {
938938
return fmt.Errorf("decrease repository num_stars: %v", err)
939939
}
940940
// ***** END: Star *****

0 commit comments

Comments
 (0)