Project

General

Profile

Actions

Bug #25407

closed

Katello::Resources::Candlepin::Consumer.get not always returns HashWithIndifferentAccess

Added by Evgeni Golov about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Fixed in Releases:
Found in Releases:

Description

ActiveSupport::HashWithIndifferentAccess allows to access Hashes in Ruby by either 'string' or :symbol Katello::Resources::Candlepin::Consumer.get will return a HashWithIndifferentAccess when called with a String param, but will only return a regular Hash when called with a Hash full of params.

As we use symbol-access in many places (like in Katello::Actions::Katello::Host::HypervisorsUpdate), but the data comes from JSON.parse originally, we should always map to HashWithIndifferentAccess

Actions

Also available in: Atom PDF