Skip to content

Commit 59fff4e

Browse files
Hotfix/rules correlation field (#2248)
* chore[](go-deps):updated go dependencies * feat[backend](rules): added correlation as a valid element on rules load --------- Co-authored-by: Yorjander Hernandez Vergara <99102374+Kbayero@users.noreply.github.com>
1 parent 8101465 commit 59fff4e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

backend/src/main/java/com/park/utmstack/service/DefinitionSyncService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ private Set<String> syncRules() {
248248
}
249249

250250
private RuleYaml mapToRuleYaml(Map<String, Object> map) {
251+
if (map.containsKey("correlation") && !map.containsKey("afterEvents")) {
252+
map.put("afterEvents", map.remove("correlation"));
253+
}
251254
Yaml yaml = new Yaml();
252255
String dump = yaml.dump(map);
253256
return yaml.loadAs(dump, RuleYaml.class);

0 commit comments

Comments
 (0)