diff options
Diffstat (limited to 'app/services/users')
-rw-r--r-- | app/services/users/destroy_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/users/destroy_service.rb b/app/services/users/destroy_service.rb index d88b81c04e2..bf1e49734cc 100644 --- a/app/services/users/destroy_service.rb +++ b/app/services/users/destroy_service.rb @@ -37,12 +37,12 @@ module Users end private - + def move_issues_to_ghost_user(user) ghost_user = User.ghost Issue.transaction do - user.issues.each { |issue| issue.update!(author: ghost_user) } + user.issues.update_all(author_id: ghost_user.id) end user.reload |