Fix user deletion script [SCI-4829]

This commit is contained in:
Oleksii Kriuchykhin 2020-08-21 13:12:14 +02:00
parent e6e47f5106
commit e0f7e181f6

View file

@ -1,7 +1,6 @@
class UserDataDeletion
def self.delete_team_data(team)
ActiveRecord::Base.logger = Logger.new(STDOUT)
Step.skip_callback(:destroy, :after, :cascade_after_destroy)
team.transaction do
# Destroy tiny_mce_assets
if team.tiny_mce_assets.present?
@ -86,7 +85,6 @@ class UserDataDeletion
team.destroy!
# raise ActiveRecord::Rollback
end
Step.set_callback(:destroy, :after, :cascade_after_destroy)
end
def self.destroy_protocol(protocol)