FIX: Don't delete profile views during user anonymization

There's no need for that and it can take a lot of time.
This commit is contained in:
Gerhard Schlager 2018-06-08 15:24:15 +02:00
parent 4ba910ac54
commit a26889ada2

View File

@ -47,9 +47,10 @@ class UserAnonymizer
options.email_direct = false
options.save
profile = @user.user_profile
profile.destroy if profile
@user.create_user_profile
if profile = @user.user_profile
profile.update(location: nil, website: nil, bio_raw: nil, bio_cooked: nil,
profile_background: nil, card_background: nil)
end
@user.user_avatar.try(:destroy)
@user.twitter_user_info.try(:destroy)