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/uploaders/records_uploads.rb')
-rw-r--r--app/uploaders/records_uploads.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/uploaders/records_uploads.rb b/app/uploaders/records_uploads.rb
index 967fcdc704e..8561a72444d 100644
--- a/app/uploaders/records_uploads.rb
+++ b/app/uploaders/records_uploads.rb
@@ -27,10 +27,14 @@ module RecordsUploads
end
def readd_upload
- uploads.where(model: model, path: upload_path).delete_all
- upload.delete if upload
+ Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.temporary_ignore_tables_in_transaction(
+ %w[uploads], url: "https://gitlab.com/gitlab-org/gitlab/-/issues/398199"
+ ) do
+ uploads.where(model: model, path: upload_path).delete_all
+ upload.delete if upload
- self.upload = build_upload.tap(&:save!)
+ self.upload = build_upload.tap(&:save!)
+ end
end
# rubocop: enable CodeReuse/ActiveRecord