Commit 4f1601c7 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'cleanup-user-cross-modification' into 'master'

Cleanup no longer needed cross modification (on users)

See merge request gitlab-org/gitlab!78682
parents 4281daf6 76adbabe
......@@ -65,10 +65,7 @@ module Users
user.destroy_dependent_associations_in_batches(exclude: [:snippets])
# Destroy the namespace after destroying the user since certain methods may depend on the namespace existing
user_data = nil
::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.allow_cross_database_modification_within_transaction(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/340260') do
user_data = user.destroy
end
namespace.destroy
user_data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment