Bug 1112208 - roles: Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed while updating activation-key's content-view
Summary: roles: Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed while...
Keywords:
Status: CLOSED DUPLICATE of bug 1077886
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-23 10:46 UTC by Sachin Ghai
Modified: 2016-04-22 16:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-28 20:04:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Firebug raises Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed (82.66 KB, image/png)
2014-06-23 10:46 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6350 0 None None None 2016-04-22 16:46:00 UTC

Description Sachin Ghai 2014-06-23 10:46:03 UTC
Created attachment 911391 [details]
Firebug raises Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed

Description of problem:
Firebug raises following error when we update activation-key's content-view via normal user who have permissions to update key in a selected org


Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: alert in alerts[type], Duplicate key: string:Activation Key updated

Version-Release number of selected component (if applicable):
sat6 beta snap10 compose2

How reproducible:
always

Steps to Reproduce:
1. Login with admin user and create a role "role1"
2.  Add following permissions for 
 "activation key" resource type  -create, view, edit and destroy
 "content-view" resource type - view
 "Life cycle environment resource type - view
3. create a new org "org1"
4. create a user and select default location and "org1"  and assign role1 to new user
5. select org1 and create a CV "cv1" and publish to Library
5. logout from admin and login with new user
6. create activation-key and select "Default CV"
7. Edit the created ak in step6 and select "cv1" (make sure firebug is ON)


Actual results:
on updating activation-key's CV, CV was updated but firebug raises 
error:

Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: alert in alerts[type], Duplicate key: string:Activation Key updated

Expected results:
no error 

Additional info:
when we update content-view, following log generated in production.log:

Processing by Katello::Api::V2::ActivationKeysController#update as JSON
  Parameters: {"organization"=>{"name"=>"role_org", "label"=>"role_org"}, "created_at"=>"2014-06-23T04:33:06Z", "updated_at"=>"2014-06-23T05:05:05Z", "id"=>"10", "name"=>"key1", "description"=>nil, "content_view"=>{"id"=>3, "name"=>"Default Organization View", "label"=>"Default_Organization_View", "description"=>nil, "organization_id"=>3, "default"=>true, "created_at"=>"2014-06-23T01:26:58Z", "updated_at"=>"2014-06-23T01:26:58Z", "composite"=>nil, "next_version"=>1, "organization"=>"role_org", "environments"=>["Library"], "versions"=>[1], "versions_details"=>[{"version"=>1, "published"=>"2014-06-23 01:26:58 UTC", "environments"=>["Library"]}]}, "content_view_id"=>2, "environment_id"=>2, "usage_count"=>0, "user_id"=>13, "usage_limit"=>11, "release_version"=>nil, "service_level"=>nil, "pools"=>[], "content_overrides"=>[], "permissions"=>{"editable"=>true, "deletable"=>true}, "environment"=>{"id"=>2, "name"=>"Library", "select"=>true, "selected"=>true}, "products"=>[], "host_collections"=>[], "api_version"=>"v2", "activation_key"=>{"id"=>"10", "name"=>"key1", "description"=>nil, "environment_id"=>2, "created_at"=>"2014-06-23T04:33:06Z", "updated_at"=>"2014-06-23T05:05:05Z", "user_id"=>13, "usage_limit"=>11, "content_view_id"=>2, "release_version"=>nil, "service_level"=>nil}}
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/views/katello/api/v2/activation_keys/show.json.rabl within katello/api/v2/layouts/resource (238.6ms)
Completed 200 OK in 371ms (Views: 220.4ms | ActiveRecord: 37.4ms)

Comment 2 Walden Raines 2014-07-09 17:47:41 UTC
Connecting redmine issue http://projects.theforeman.org/issues/6350 from this bug

Comment 3 Walden Raines 2014-07-09 17:48:34 UTC
Ivan already has a PR open for this: https://github.com/Katello/katello/pull/4344

Comment 4 Bryan Kearney 2014-07-28 20:04:10 UTC

*** This bug has been marked as a duplicate of bug 1077886 ***


Note You need to log in before you can comment on or make changes to this bug.