Repository: qpid-dispatch Updated Branches: refs/heads/master 7a5b09170 -> 2c820bb19
DISPATCH-751 Prevent error message when schema has attribute type of integer but default value of string Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/2c820bb1 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/2c820bb1 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/2c820bb1 Branch: refs/heads/master Commit: 2c820bb199a980b0f93926624dc38052aed9485c Parents: 7a5b091 Author: Ernest Allen <[email protected]> Authored: Mon Apr 24 13:18:00 2017 -0400 Committer: Ernest Allen <[email protected]> Committed: Mon Apr 24 13:18:00 2017 -0400 ---------------------------------------------------------------------- console/stand-alone/plugin/js/qdrList.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/2c820bb1/console/stand-alone/plugin/js/qdrList.js ---------------------------------------------------------------------- diff --git a/console/stand-alone/plugin/js/qdrList.js b/console/stand-alone/plugin/js/qdrList.js index 0e5ee8f..b997cdb 100644 --- a/console/stand-alone/plugin/js/qdrList.js +++ b/console/stand-alone/plugin/js/qdrList.js @@ -226,8 +226,12 @@ var QDR = (function(QDR) { for (attr in schemaEntity.attributes) { var entity = schemaEntity.attributes[attr] var value = "" - if (angular.isDefined(entity['default'])) - value = entity['default'] + if (angular.isDefined(entity['default'])) { + if (entity['type'] === 'integer') + value = parseInt(entity['default']) // some default values that are marked as integer are passed as string + else + value = entity['default'] + } row[attr] = { value: value, type: entity.type, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
