@@ -41,10 +41,6 @@ const indexProject = Promise.coroutine(function* (logger, msg) { // eslint-disab
41
41
// removes non required fields from phase objects
42
42
data . phases = data . phases . map ( phase => _ . omit ( phase , [ 'deletedAt' , 'deletedBy' ] ) ) ;
43
43
}
44
- // TEMPORARY FIX: should fix ES mapping instead and reindex all the projects instead
45
- if ( typeof _ . get ( data , 'details.taasDefinition.team.skills' ) !== 'string' ) {
46
- _ . set ( data , 'details.taasDefinition.team.skills' , '' ) ;
47
- }
48
44
// add the record to the index
49
45
const result = yield eClient . index ( {
50
46
index : ES_PROJECT_INDEX ,
@@ -95,10 +91,6 @@ const projectUpdatedHandler = Promise.coroutine(function* (logger, msg, channel)
95
91
// first get the existing document and than merge the updated changes and save the new document
96
92
const doc = yield eClient . get ( { index : ES_PROJECT_INDEX , type : ES_PROJECT_TYPE , id : data . original . id } ) ;
97
93
const merged = _ . merge ( doc . _source , data . updated ) ; // eslint-disable-line no-underscore-dangle
98
- // TEMPORARY FIX: should fix ES mapping instead and reindex all the projects instead
99
- if ( typeof _ . get ( merged , 'details.taasDefinition.team.skills' ) !== 'string' ) {
100
- _ . set ( merged , 'details.taasDefinition.team.skills' , '' ) ;
101
- }
102
94
// update the merged document
103
95
yield eClient . update ( {
104
96
index : ES_PROJECT_INDEX ,
@@ -181,10 +173,6 @@ async function projectUpdatedKafkaHandler(app, topic, payload) {
181
173
try {
182
174
const doc = await eClient . get ( { index : ES_PROJECT_INDEX , type : ES_PROJECT_TYPE , id : previousValue . id } ) ;
183
175
const merged = _ . merge ( doc . _source , project . get ( { plain : true } ) ) ; // eslint-disable-line no-underscore-dangle
184
- // TEMPORARY FIX: should fix ES mapping instead and reindex all the projects instead
185
- if ( typeof _ . get ( merged , 'details.taasDefinition.team.skills' ) !== 'string' ) {
186
- _ . set ( merged , 'details.taasDefinition.team.skills' , '' ) ;
187
- }
188
176
// update the merged document
189
177
await eClient . update ( {
190
178
index : ES_PROJECT_INDEX ,
0 commit comments