Project

General

Profile

Bug #6365

Failed validation on Repository label raises a weird error message on

Added by Partha Aji almost 6 years ago. Updated 9 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
trivial
Triaged:
Yes
Bugzilla link:
Pull request:
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 almost 6 years ago

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

#2 Updated by Eric Helms over 4 years ago

  • Legacy Backlogs Release (now unused) set to 86

#3 Updated by Eric Helms over 4 years ago

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

#4 Updated by John Mitsch 9 months ago

  • Target version deleted (Katello Backlog)
  • Status changed from New to Rejected

Thanks for reporting this issue. This issue was created over 4 years ago and hasn't seen an update in 1 year. We are closing this in an effort to keep a realistic backlog. Please open up a new issue that includes a link to this issue if you feel this still needs to be addressed. We can then triage the new issue and reassess.

Also available in: Atom PDF