Skip to content

Commit

Permalink
Merge pull request #868 from eclarizio/BZ1478367
Browse files Browse the repository at this point in the history
[EUWE] Fix for issue with provisioning sending in an integer when it should be a string
(cherry picked from commit ec533b5)

https://bugzilla.redhat.com/show_bug.cgi?id=1478367
  • Loading branch information
simaishi committed Aug 14, 2017
1 parent 1278e43 commit a402325
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/app/core/dialog-field-refresh.service.js
Expand Up @@ -49,7 +49,7 @@ export function DialogFieldRefreshFactory(CollectionsApi, EventNotifications, Au
}
}
}
if (parseInt(dialogField.default_value, 10)) {
if (dialogField.data_type === "integer") {
dialogField.default_value = parseInt(dialogField.default_value, 10);
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/app/core/dialog-field-refresh.service.spec.js
Expand Up @@ -319,7 +319,7 @@ describe('DialogFieldRefresh', function() {
});

describe('when there is a default value assigned', function() {
var dialogField = {name: 'dialog1', values: [[1, 'one'], [2, 'two']], default_value: 2};
var dialogField = {name: 'dialog1', values: [[1, 'one'], [2, 'two']], default_value: 2, data_type: "integer"};
var dialogs = [{dialog_tabs: [{dialog_groups: [{dialog_fields: [dialogField]}]}]}];

it('pushes the dialog field into the all dialog fields array', function() {
Expand Down
Expand Up @@ -80,7 +80,7 @@ describe('services.custom_button_details', function() {
'services',
123,
{},
'{"action":"buttonName","resource":{"dialogField1":1,"dialogField2":2}}'
'{"action":"buttonName","resource":{"dialogField1":"1","dialogField2":"2"}}'
);
});

Expand Down

0 comments on commit a402325

Please sign in to comment.