Project

General

Profile

Bug #23943

foreman-rake katello:regenerate_repo_metadata failed with "NoMethodError: undefined method `in_default_view' for #<Array:0x000000000ce126f0>"

Added by Stephen Benjamin about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Repositories
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1589646

Description of problem:

Can't run foreman-rake katello:regenerate_repo_metadata as it failed with

"NoMethodError: undefined method `in_default_view' for #<Array:0x000000000ce126f0>"

Version-Release number of selected component (if applicable):

6.3.1

How reproducible:

Easy

Steps to Reproduce:

foreman-rake katello:regenerate_repo_metadata

Actual results:

"NoMethodError: undefined method `in_default_view' for #<Array:0x000000000ce126f0>"

Expected results:

No error.

Associated revisions

Revision bd3b03ac (diff)
Added by Stephen Benjamin about 3 years ago

fixes #23943 - use order instead of sort

.sort in Rails 5 returns an array, but scopes like in_default_view is
called on the sorted array. This changes the rake task to use SQL
sorting with order instead.

History

#1 Updated by The Foreman Bot about 3 years ago

  • Assignee set to Stephen Benjamin
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7452 added

#2 Updated by Stephen Benjamin about 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#3 Updated by Jonathon Turel almost 3 years ago

  • Legacy Backlogs Release (now unused) set to 338
  • Subject changed from foreman-rake katello:regenerate_repo_metadata failed with "NoMethodError: undefined method `in_default_view' for #<Array:0x000000000ce126f0>" to foreman-rake katello:regenerate_repo_metadata failed with "NoMethodError: undefined method `in_default_view' for #<Array:0x000000000ce126f0>"

Also available in: Atom PDF