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:
authorAdam Hegyi <ahegyi@gitlab.com>2019-07-11 07:48:50 +0300
committerAdam Hegyi <ahegyi@gitlab.com>2019-07-11 16:52:55 +0300
commitdfe906209e2238b82c84c9fb435498cae2f3d43e (patch)
tree514cf0cd3595fffe175b9cc5eb88dee4881186a8 /app/uploaders/records_uploads.rb
parent0cd59a756cdee7aac8915f3e96ba4f065e5cbc9c (diff)
Queries for Upload should be scoped by model
Diffstat (limited to 'app/uploaders/records_uploads.rb')
-rw-r--r--app/uploaders/records_uploads.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/uploaders/records_uploads.rb b/app/uploaders/records_uploads.rb
index 00b51f92b12..d7a859ebd5f 100644
--- a/app/uploaders/records_uploads.rb
+++ b/app/uploaders/records_uploads.rb
@@ -35,7 +35,7 @@ module RecordsUploads
end
def readd_upload
- uploads.where(path: upload_path).delete_all
+ uploads.where(model: model, path: upload_path).delete_all
upload.delete if upload
self.upload = build_upload.tap(&:save!)