Project

General

Profile

Actions

Bug #6336

closed

500 ISE on creating an activation key with same name as the one already exists in other org

Added by Thomas McKay almost 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Web UI
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1105024
Description of problem:
I created an org "org1" and created a activation key with name "ak1" under org1.
Later, i created another org "org2" and tried to create an activation key with same name "ak1" (as the one already in org1) but this time I couldn't able to save the create activation key form. And production.log thrown an 500 Internal Server error:

Processing by Katello::Api::V2::ActivationKeysController#create as JSON
Parameters: {"usage_limit"=>-1, "name"=>"ak1", "environment"=>{"id"=>2, "name"=>"Library", "select"=>true, "selected"=>true}, "content_view_id"=>2, "organization_id"=>"3", "api_version"=>"v2", "activation_key"=>{"name"=>"ak1", "organization_id"=>"3", "usage_limit"=>-1, "content_view_id"=>2}}
PGError: ERROR: duplicate key value violates unique constraint "index_activation_keys_on_label"

Version-Release number of selected component (if applicable):
sat6 beta snap8 (Satellite-6.0.3-RHEL-6-20140604.0)

How reproducible:
always

Steps to Reproduce:
1. Create org1
2. create activation key with name ak1 under org1
3. create org2
4. create another activation key with same name "ak1" under "org2"

Actual results:
Processing by Katello::Api::V2::ActivationKeysController#create as JSON
Parameters: {"usage_limit"=>-1, "name"=>"ak1", "environment"=>{"id"=>2, "name"=>"Library", "select"=>true, "selected"=>true}, "content_view_id"=>2, "organization_id"=>"3", "api_version"=>"v2", "activation_key"=>{"name"=>"ak1", "organization_id"=>"3", "usage_limit"=>-1, "content_view_id"=>2}}
PGError: ERROR: duplicate key value violates unique constraint "index_activation_keys_on_label"

Expected results:
I think user should be able to create activation key with same name in two different orgs and there shouldn't be any error in production.log

Additional info:

Actions #1

Updated by Thomas McKay almost 10 years ago

  • Status changed from New to Assigned
  • Target version set to 48
  • Triaged set to No
Actions #2

Updated by Christine Fouant almost 10 years ago

  • Assignee changed from Thomas McKay to Christine Fouant
Actions #3

Updated by Christine Fouant almost 10 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Applied in changeset katello|commit:c61c7c7b262b1563407477a068ce2d963fb11db2.

Actions #4

Updated by Eric Helms almost 10 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by Eric Helms over 9 years ago

  • translation missing: en.field_release set to 13
Actions

Also available in: Atom PDF