diff options
author | Sean McGivern <sean@gitlab.com> | 2019-04-30 10:55:48 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-04-30 10:55:48 +0300 |
commit | c10d009191b379078d28a7cba5fed4060aa346c8 (patch) | |
tree | f1d9fee213ea95e3b0921ec9eedc790ec764acb7 /app | |
parent | cc2c513bd5c270212035d0c5d8a00250d7aca05c (diff) | |
parent | 25818bd7ae765422c934d0a32efb4ba353d11183 (diff) |
Merge branch 'sh-disable-batch-load-replace-methods' into 'master'
Disable method replacement in avatar loading
Closes #60903
See merge request gitlab-org/gitlab-ce!27866
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/avatarable.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/concerns/avatarable.rb b/app/models/concerns/avatarable.rb index 4687ec7d166..80278e07e65 100644 --- a/app/models/concerns/avatarable.rb +++ b/app/models/concerns/avatarable.rb @@ -91,7 +91,8 @@ module Avatarable private def retrieve_upload_from_batch(identifier) - BatchLoader.for(identifier: identifier, model: self).batch(key: self.class) do |upload_params, loader, args| + BatchLoader.for(identifier: identifier, model: self) + .batch(key: self.class, cache: true, replace_methods: false) do |upload_params, loader, args| model_class = args[:key] paths = upload_params.flat_map do |params| params[:model].upload_paths(params[:identifier]) |