Commit b84b32ed authored by Jasper Maes's avatar Jasper Maes

Passing an argument to force an association to reload is now deprecated

parent 242baf12
......@@ -313,7 +313,8 @@ class MergeRequestDiff < ActiveRecord::Base
# merge_request_diff_commits.reload is preferred way to reload associated
# objects but it returns cached result for some reason in this case
commits = merge_request_diff_commits(true)
# we can circumvent that by specifying that we need an uncached reload
commits = self.class.uncached { merge_request_diff_commits.reload }
self.commits_count = commits.size
end
......
---
title: Passing an argument to force an association to reload is now deprecated
merge_request: 23334
author: Jasper Maes
type: other
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