Skip to content

Commit

Permalink
fixed rule object to yaml conversion for timeframe (#1020) (#1040)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2b1c6f1)

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent b0193a4 commit 9ca8d9b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ export class DetectionVisualEditor extends React.Component<
let selectionMaps: any = {};

selection.data.forEach((datum) => {
if (datum.field) {
if (selection.name === 'timeframe') {
selectionMaps = datum.values[0] || '';
} else if (datum.field) {
const key = `${datum.field}${datum.modifier ? `|${datum.modifier}` : ''}`;
selectionMaps[key] = datum.values;
} else {
Expand Down

0 comments on commit 9ca8d9b

Please sign in to comment.