Skip to content

Commit f321980

Browse files
michaelkuhnappleboy
authored andcommitted
Fix typo in deleteUser (#3781)
num_watches was used where num_stars should have been used.
1 parent 38a9cda commit f321980

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
@@ -935,7 +935,7 @@ func deleteUser(e *xorm.Session, u *User) error {
935935
if err = e.Table("star").Cols("star.repo_id").
936936
Where("star.uid = ?", u.ID).Find(&starredRepoIDs); err != nil {
937937
return fmt.Errorf("get all stars: %v", err)
938-
} else if _, err = e.Decr("num_watches").In("id", starredRepoIDs).Update(new(Repository)); err != nil {
938+
} else if _, err = e.Decr("num_stars").In("id", starredRepoIDs).Update(new(Repository)); err != nil {
939939
return fmt.Errorf("decrease repository num_stars: %v", err)
940940
}
941941
// ***** END: Star *****

0 commit comments

Comments
 (0)