Skip to content

Commit

Permalink
Merge pull request #48 from IGNF/v2.3.9.1
Browse files Browse the repository at this point in the history
Correction Bug grid #15294
  • Loading branch information
vinsag authored Oct 12, 2021
2 parents 0476a55 + b184abb commit 8aafe15
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion controllers/er/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ function createErProxy(featureTypeName,typeSearch){
}
//For module Product utilisation parametre name pour la recherche
if ((typeSearch == 'product') && (params.name)) {
params.name = params.name.toUpperCase();
params.namepr = params.name.toUpperCase();
params = _.omit(params,'name');
}

// For module Category Gestion du parametre name
Expand Down
1 change: 0 additions & 1 deletion lib/ClientEr.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ ClientEr.prototype.getFeatures = function (typeName, params) {
* bbox and attribute filter as POST parameter
*/
var cql_filter = buildErCqlFilter(params);
console.log("cql_filter: "+cql_filter);
var body = (cql_filter !== null) ? 'cql_filter=' + encodeURI(cql_filter) : '';
return httpClient.post(this.getUrl(), body, {
params: queryParams,
Expand Down
2 changes: 1 addition & 1 deletion lib/buildErCqlFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function bboxToFilter(bbox){
var value_date = params[name].split(';');
parts.push('updated_at AFTER '+ value_date[0]+' AND updated_at BEFORE '+ value_date[1]);

} else if (name == 'name') {
} else if (name == 'namepr') { //Traiter le cas du produit avec le parametre name
parts.push(' name ILIKE \'%'+ params[name] + '%\' OR name_complement ILIKE \'%'+ params[name] + '%\'');

} else {
Expand Down

0 comments on commit 8aafe15

Please sign in to comment.