Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/concerns/users/migrate_to_ghost_user.rb')
-rw-r--r--app/services/concerns/users/migrate_to_ghost_user.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/concerns/users/migrate_to_ghost_user.rb b/app/services/concerns/users/migrate_to_ghost_user.rb
index ecbbf3026a0..0779d12cd3a 100644
--- a/app/services/concerns/users/migrate_to_ghost_user.rb
+++ b/app/services/concerns/users/migrate_to_ghost_user.rb
@@ -21,6 +21,7 @@ module Users::MigrateToGhostUser
move_issues_to_ghost_user(user)
move_merge_requests_to_ghost_user(user)
+ move_notes_to_ghost_user(user)
end
user.reload
@@ -35,4 +36,8 @@ module Users::MigrateToGhostUser
def move_merge_requests_to_ghost_user(user)
user.merge_requests.update_all(author_id: ghost_user.id)
end
+
+ def move_notes_to_ghost_user(user)
+ user.notes.update_all(author_id: ghost_user.id)
+ end
end