From 3ad6d2e1d70966dbb3ccc6a13bbfc492beb17e1f Mon Sep 17 00:00:00 2001
From: Benjamin Renard <benjamin.renard@akka.eu>
Date: Thu, 8 Feb 2018 14:42:17 +0100
Subject: [PATCH] Fix boolean arguments (#5797)

---
 js/app/models/RequestParamObject.js | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/js/app/models/RequestParamObject.js b/js/app/models/RequestParamObject.js
index 58d31bf..ae5a647 100644
--- a/js/app/models/RequestParamObject.js
+++ b/js/app/models/RequestParamObject.js
@@ -74,7 +74,12 @@ Ext.define('amdaModel.RequestParamObject', {
 		if (this.get('template_args')) {
 			Ext.Object.each(this.get('template_args'), function (argKey, argValue) {
 				template_args += "_";
-				template_args += argValue;
+				if (typeof(argValue) === "boolean") {
+					template_args += (argValue ? 1 : 0);
+				}
+				else {
+					template_args += argValue;
+				}
 			});
 		}
 		
@@ -104,11 +109,16 @@ Ext.define('amdaModel.RequestParamObject', {
     	if (this.get('template_args') != null) {
     		paramValues['template_args'] = new Object();
     		Ext.Object.each(this.get('template_args'), function (argKey, argValue) {
-    			paramValues['template_args'][argKey] = argValue;
+			if (typeof(argValue) === "boolean") {
+				paramValues['template_args'][argKey] = (argValue ? 1 : 0);
+			}
+			else {
+    				paramValues['template_args'][argKey] = argValue;
+			}
     		});
     	}
     	
     	return paramValues;
     }
       
-});
\ No newline at end of file
+});
--
libgit2 0.21.2