Skip to content

Commit

Permalink
change reporting year query - feature server - Unable to complete ope…
Browse files Browse the repository at this point in the history
…ration.
  • Loading branch information
claudiaifrim committed May 4, 2021
1 parent 6337c4e commit 5909742
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ const OpenlayersMapView = (props) => {
} else {
options = splitBy(props.discodata_query.search[id], ',');
}

if (where.type === 'multiple') {
options = isArray(options) ? options?.filter((option) => option) : [];
const conditions = [];
Expand All @@ -415,7 +416,13 @@ const OpenlayersMapView = (props) => {
where.sql = null;
}
} else {
where.sql = options ? where.sql.replace(/:options/g, options) : null;
if (id === 'reportingYear' && options) {
where.sql = options
? where.sql.replace(/:options/g, options).replace(/'/g, '')
: null;
} else {
where.sql = options ? where.sql.replace(/:options/g, options) : null;
}
}
if (!where.sql) delete sitesSourceQuery.whereStatements[id];
});
Expand Down

0 comments on commit 5909742

Please sign in to comment.