Skip to content

Commit

Permalink
Update models/user.go
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath authored Sep 5, 2022
1 parent 70778ab commit 4a6c96e
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 @@ -103,7 +103,7 @@ func DeleteUser(ctx context.Context, u *user_model.User, purge bool) (err error)
// Delete Comments
const batchSize = 50
for {
comments := make([]*issues_model.Comment, 0, 50)
comments := make([]*issues_model.Comment, 0, batchSize)
if err = e.Where("type=? AND poster_id=?", issues_model.CommentTypeComment, u.ID).Limit(batchSize, 0).Find(&comments); err != nil {
return err
}
Expand Down

0 comments on commit 4a6c96e

Please sign in to comment.