From a89c91374dfa6cd89149e0173aaa30a37569c12b Mon Sep 17 00:00:00 2001 From: Zita Nemeckova Date: Tue, 24 Sep 2019 12:05:37 +0200 Subject: [PATCH] Use correct id for delete action Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1753388 --- .../generic_object/generic-object-definition-toolbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/components/generic_object/generic-object-definition-toolbar.js b/app/assets/javascripts/components/generic_object/generic-object-definition-toolbar.js index 510d5aa2b227..472e65cd4d5a 100644 --- a/app/assets/javascripts/components/generic_object/generic-object-definition-toolbar.js +++ b/app/assets/javascripts/components/generic_object/generic-object-definition-toolbar.js @@ -37,7 +37,7 @@ function genericObjectDefinitionToolbarController(API, miqService, $window) { // private functions function postGenericObjectDefinitionAction() { - var currentRecordId = toolbar.recordId || ManageIQ.record.recordId; + var currentRecordId = ManageIQ.record.recordId; if (toolbar.action === 'delete' && !currentRecordId) { _.forEach(toolbar.genericObjectDefinitions, function(recordId) { API.get('/api/generic_object_definitions/' + recordId + '?attributes=generic_objects_count')