Project

General

Profile

Actions

Bug #13501

closed

Repository url gets set to nil on update

Added by David Davis almost 9 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

$ h repository create --product-id 1 --name zooldr --url "https://davidd.fedorapeople.org/repos/zoo-lander/" --content-type yum --download-policy on_demand
Repository created
$ h repository update --id 2 --checksum-type sha1
Repository updated
$ h repository info --id 2
...
ID:                 2
Name:               zooldr
Label:              zooldr
Organization:       Default Organization
Red Hat Repository: no
Content Type:       yum
Checksum Type:      sha1
URL:                
Publish Via HTTP:   yes
Published At:       http://katello-2-8-dev.example.com/pulp/repos/Default_Organization/Library/custom/Test/zooldr
...

Confirmed that the CLI is sending the correct/expected params via -d.

Looks like the offending line is here:

https://github.com/Katello/katello/blob/ffea9448132ff113bb3aca4028db29ca25aa100d/app/controllers/katello/api/v2/repositories_controller.rb#L193

Note the following code:

[10] pry(main)> repo_params = {:checksum => "blah"}                                                                                                                                                              
{
    :checksum => "blah" 
}
[11] pry(main)> repo_params[:url].blank?                                                                                                                                                                         
true
Actions

Also available in: Atom PDF