add alertcontact in uptimerobotservice

This commit is contained in:
giuseppenuc committed 2022-07-22 11:26:02 +02:00
1 parent 02dc8f76d1
commit dfbff8b44e
1 file changed
+5 -4
+5 -4
View File
@@ -97,10 +97,11 @@ class UptimeRobotApiService
$alertContacts = explode(',', $alertContactsString);
foreach ($alertContacts as $alertContactName) {
$alertContact = $this->alertContactService->findbyName($alertContactName);
if ($alertContact instanceof AlertContact) {
$this->alertContacts[] = $alertContact;
if (!empty($alertContactName)) {
$alertContact = $this->alertContactService->findbyName($alertContactName);
if ($alertContact instanceof AlertContact) {
$this->alertContacts[] = $alertContact;
}
}
}
}