Skip to content

Commit 4a6c96e

Browse files
authored
Update models/user.go
1 parent 70778ab commit 4a6c96e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/user.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func DeleteUser(ctx context.Context, u *user_model.User, purge bool) (err error)
103103
// Delete Comments
104104
const batchSize = 50
105105
for {
106-
comments := make([]*issues_model.Comment, 0, 50)
106+
comments := make([]*issues_model.Comment, 0, batchSize)
107107
if err = e.Where("type=? AND poster_id=?", issues_model.CommentTypeComment, u.ID).Limit(batchSize, 0).Find(&comments); err != nil {
108108
return err
109109
}

0 commit comments

Comments
 (0)