Commit 3ad6d2e1d70966dbb3ccc6a13bbfc492beb17e1f

Authored by Benjamin Renard
1 parent dbbe0ccd

Fix boolean arguments (#5797)

Showing 1 changed file with 13 additions and 3 deletions   Show diff stats
js/app/models/RequestParamObject.js
... ... @@ -74,7 +74,12 @@ Ext.define('amdaModel.RequestParamObject', {
74 74 if (this.get('template_args')) {
75 75 Ext.Object.each(this.get('template_args'), function (argKey, argValue) {
76 76 template_args += "_";
77   - template_args += argValue;
  77 + if (typeof(argValue) === "boolean") {
  78 + template_args += (argValue ? 1 : 0);
  79 + }
  80 + else {
  81 + template_args += argValue;
  82 + }
78 83 });
79 84 }
80 85  
... ... @@ -104,11 +109,16 @@ Ext.define('amdaModel.RequestParamObject', {
104 109 if (this.get('template_args') != null) {
105 110 paramValues['template_args'] = new Object();
106 111 Ext.Object.each(this.get('template_args'), function (argKey, argValue) {
107   - paramValues['template_args'][argKey] = argValue;
  112 + if (typeof(argValue) === "boolean") {
  113 + paramValues['template_args'][argKey] = (argValue ? 1 : 0);
  114 + }
  115 + else {
  116 + paramValues['template_args'][argKey] = argValue;
  117 + }
108 118 });
109 119 }
110 120  
111 121 return paramValues;
112 122 }
113 123  
114   -});
115 124 \ No newline at end of file
  125 +});
... ...