[openSUSE/open-build-service] 5d3080: Do not rely on named scope chain for BsRequest::Fi...
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: 5d3080c2f72b31310355af62a2ad79293dd98723 https://github.com/openSUSE/open-build-service/commit/5d3080c2f72b31310355af... 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 no 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> Commit: aa368569ed471085e3109562638ce4250535a730 https://github.com/openSUSE/open-build-service/commit/aa368569ed471085e31095... Author: Henne Vogelsang <hvogel@opensuse.org> 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: ----------- Merge pull request #11282 from openSUSE/next_rails-7 Do not rely on named scope chain for BsRequest::FindFor::Query Compare: https://github.com/openSUSE/open-build-service/compare/38a760274bef...aa3685...
participants (1)
-
Henne Vogelsang