From 95f8bf6ca3cbcb204ab37be889ce8824d0eadc51 Mon Sep 17 00:00:00 2001 From: Allen Short Date: Tue, 16 Jan 2018 22:06:32 +0000 Subject: [PATCH] Unique names for query parameters (re #164) --- client/app/services/query.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/app/services/query.js b/client/app/services/query.js index 317da77c11..7e66ff874d 100644 --- a/client/app/services/query.js +++ b/client/app/services/query.js @@ -357,7 +357,7 @@ export class Parameter { return { [`${prefix}${this.name}`]: JSON.stringify(this.value) }; } return { - [`${prefix}${this.name}`]: this.value, + [`${prefix}${this.name}_${this.parentQueryId}`]: this.value, [`${prefix}${this.name}.start`]: null, [`${prefix}${this.name}.end`]: null, }; @@ -375,7 +375,7 @@ export class Parameter { this.setValue([query[keyStart], query[keyEnd]]); } } else { - const key = `${prefix}${this.name}`; + const key = `${prefix}${this.name}_${this.parentQueryId}`; if (has(query, key)) { if (this.multiValuesOptions) { try { @@ -762,7 +762,7 @@ function QueryResource( }); } Object.keys(params).forEach(key => params[key] == null && delete params[key]); - params = map(params, (value, name) => `${encodeURIComponent(name)}=${encodeURIComponent(value)}`).join('&'); + params = map(params, (value, name) => `${encodeURIComponent(name)}_${this.id}=${encodeURIComponent(value)}`).join('&'); if (params !== '') { url += `?${params}`;