Return unloaded commit if it couldn't be enriched
When a commit could not be enriched, we want to return the original commit. When calling `Commit.lazy` we get a `BatchLoader` instance that behaves like `nil`. So now we explicitly trigger the loading in batch and replace the commit with the original commit if it could not be loaded. When a commit could not be enriched, we want to return the original commit. When calling `Commit.lazy` we get a `BatchLoader` instance that behaves like `nil`. So now we explicitly trigger the loading in batch and replace the commit with the original commit if it could not be loaded. This makes sure the merge request view can still be loaded for merge requests for which the source branch became unavailable.
Showing
Please register or sign in to comment