[openSUSE/open-build-service] 7fb97c: Do not rely on named scope chain for BsRequest::Fi...
Branch: refs/heads/next_rails-7 Home: https://github.com/openSUSE/open-build-service Commit: 7fb97ceeb8f99cd22480c06710479c81a656771e https://github.com/openSUSE/open-build-service/commit/7fb97ceeb8f99cd22480c0... Author: Dany Marcoux <dmarcoux@posteo.de> Date: 2021-06-24 (Thu, 24 Jun 2021) Changed paths: M src/api/app/models/bs_request.rb M src/api/app/models/bs_request/find_for/query.rb Log Message: ----------- Do not rely on named scope chain for BsRequest::FindFor::Query Since Rails 6.1 named scope chains will not longer leak the scope to class level querying methods. As a result of this, the "BsRequest::FindFor::Query#all" starts to perform some of its queries again on the unscoped relation instead of keeping them chained. This resulted in unexpected/wrong results. See https://guides.rubyonrails.org/6_1_release_notes.html#active-record-notable-... Related to https://github.com/openSUSE/open-build-service/issues/9748 Co-authored-by: Lukas Krause <lkrause@suse.de>
participants (1)
-
Dany Marcoux