Project

General

Profile

Bug #6365

Failed validation on Repository label raises a weird error message on

Added by Partha Aji about 5 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Database
Target version:
Difficulty:
trivial
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

1) Create a repository
2) then create a second one with same label. Something like

$ hammer repository create --name=boo1 --label=boo --product=justin --organization-id=1 --content-type=yum --url=http://justin.com
Could not create the repository:
Validation failed: Pulp has already been taken, Label has already been taken for this product.

This call is raising the right error and telling me correctly that the label has already been taken. But I don't know why it says Pulp has already been taken. I have no product or repos called pulp.

Basically this happens because of
https://github.com/Katello/katello/blob/master/app/models/katello/repository.rb#L65

validates :pulp_id, :presence => true, :uniqueness => true

However the user has no concept of a "pulp_id". Its more an internal attribute that is required to connect repos from katello to pulp . We need to somehow suppress this error message.

History

#1 Updated by Eric Helms about 5 years ago

  • Category set to Database
  • Difficulty set to trivial
  • Triaged changed from No to Yes

#2 Updated by Eric Helms over 3 years ago

  • Legacy Backlogs Release (now unused) set to 86

#3 Updated by Eric Helms over 3 years ago

  • Legacy Backlogs Release (now unused) changed from 86 to 114

Also available in: Atom PDF