Skip to content
Snippets Groups Projects
Commit 40ca6fac authored by Timothee P's avatar Timothee P :sunflower:
Browse files

fix sonaQube check of overiding escape method

parent afb54d76
No related branches found
No related tags found
1 merge request!707REDMINE_ISSUE-18740 | Export signalements - Liste de valeurs pré-enregistrées n'ont pas la bonne forme
......@@ -384,7 +384,7 @@
<script>
import { csv } from 'csvtojson';
import { escape } from 'lodash';
import { escape as _escape } from 'lodash';
import { mapActions, mapMutations, mapGetters, mapState } from 'vuex';
import { formatStringDate, transformProperties } from '@/utils';
......@@ -559,7 +559,7 @@ export default {
async checkPreRecordedValue(fieldValue, listName) {
const fieldLabel = fieldValue.label || fieldValue;
// query existing prerecorded list values (with label to limit results in response, there could be many) and escape special characters, since single quote causes error in backend
await this.GET_SELECTED_PRERECORDED_LIST_VALUES({ name: listName, pattern: escape(fieldLabel) });
await this.GET_SELECTED_PRERECORDED_LIST_VALUES({ name: listName, pattern: _escape(fieldLabel) });
// check if the value exist in available prerecorded list values
return this.selectedPrerecordedListValues[listName].some((el) => el.label === fieldLabel);
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment