Skip to content

Resolve "Merge requests API return 500 when filter by approval is used"

What does this MR do and why?

When we call .size - this may return a hash when it is using a group by (https://apidock.com/rails/ActiveRecord/Calculations/count), and it also means that we are doing an additional query.

By using length we are loading the records (but they are going to be loaded anyway in the next line).

Related to #372342 (closed)

Edited by Marc Shaw

Merge request reports

Loading