Skip to content

Commit aaec2ca

Browse files
committed
Merge branch 'release/v11.2.0' of github.com:utmstack/UTMStack into release/v11.2.0
2 parents e0db7ba + 8c09cf4 commit aaec2ca

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

backend/src/main/java/com/park/utmstack/service/impl/UtmAlertServiceImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ public void checkForNewAlerts() {
104104
initialDate.setLastAlertTimestamp(alerts.get(alerts.size() - 1).getTimestampAsInstant());
105105
lastAlertRepository.save(initialDate);
106106

107-
for (UtmAlert alert : alerts) {
107+
List<UtmAlert> parentsAlert = alerts.stream()
108+
.filter(a -> Objects.isNull(a.getParentId()))
109+
.toList();
110+
111+
for (UtmAlert alert : parentsAlert) {
108112
String emails = Constants.CFG.get(Constants.PROP_ALERT_ADDRESS_TO_NOTIFY_ALERTS);
109113

110114
if (!StringUtils.hasText(emails)) {

0 commit comments

Comments
 (0)