Project

General

Profile

Actions

Bug #29245

closed

modulemd endpoint now correctly returns arrays instead of strings

Added by Samir Jha about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Before:

[2] pry(main)> service = Katello::Pulp3::ModuleStream.new("/pulp/api/v3/content/rpm/modulemds/81b526ae-0a09-43bf-9ab1-9402955a09f6/")
=> #<Katello::Pulp3::ModuleStream:0x0000000011e43368 @uuid="/pulp/api/v3/content/rpm/modulemds/81b526ae-0a09-43bf-9ab1-9402955a09f6/">
[3] pry(main)> service.backend_data['artifacts']

=> "[\"walrus-0:0.71-1.noarch\"]"
[4] pry(main)> JSON.parse service.backend_data['artifacts']
=> ["walrus-0:0.71-1.noarch"]

On pulpcore master:

[8] pry(main)> service.backend_data['artifacts']
=> ["duck-0:0.6-1.noarch"]
[9] pry(main)> JSON.parse service.backend_data['artifacts']
TypeError: no implicit conversion of Array into String
from /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/json-2.3.0/lib/json/common.rb:156:in `initialize'

Actions #1

Updated by Ian Ballou about 4 years ago

  • Triaged changed from No to Yes
Actions #2

Updated by Samir Jha about 4 years ago

  • Status changed from New to Closed

Fixed as part of pulpcore 3.2 upgrade.

Actions #3

Updated by Samir Jha about 4 years ago

  • Target version changed from Katello 3.16.0 to Katello Recycle Bin
Actions

Also available in: Atom PDF