Skip to content

Commit

Permalink
add index
Browse files Browse the repository at this point in the history
Signed-off-by: Kavitha Conjeevaram Mohan <[email protected]>
  • Loading branch information
kavithacm committed Sep 20, 2023
1 parent 89e0a07 commit e7d5290
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/routes/utils/dataReportHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ export const getOpenSearchData = (
let keys;
keys = dateField.split('.');
if (keys.length === 1) {
data._source[keys] = moment(fields[dateField]).format(dateFormat);
data._source[keys] = moment(fields[dateField][0]).format(dateFormat);
} else {
let keyElement = keys.shift();
keys.push(moment(fields[dateField]).format(dateFormat));
keys.push(moment(fields[dateField][0]).format(dateFormat));
const nestedJSON = arrayToNestedJSON(keys);
let keyLength = Object.keys(data._source);
if (tempKeyElement.includes(keyElement) || keyLength.length > 1) {
Expand Down

0 comments on commit e7d5290

Please sign in to comment.