diff options
author | Sean McGivern <sean@gitlab.com> | 2019-04-30 07:55:48 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-04-30 07:55:48 +0000 |
commit | c10d009191b379078d28a7cba5fed4060aa346c8 (patch) | |
tree | f1d9fee213ea95e3b0921ec9eedc790ec764acb7 /app/models | |
parent | cc2c513bd5c270212035d0c5d8a00250d7aca05c (diff) | |
parent | 25818bd7ae765422c934d0a32efb4ba353d11183 (diff) | |
download | gitlab-ce-c10d009191b379078d28a7cba5fed4060aa346c8.tar.gz |
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/models')
-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]) |