return if there is no item for the audit notification
This commit is contained in:
@@ -84,6 +84,11 @@ class AuditNotification extends Notification
|
||||
$location = $params['location'] ?? '';
|
||||
$setting = Setting::getSettings();
|
||||
|
||||
//if somehow a notification triggers without an item, bail out.
|
||||
if(!$item || !is_object($item)){
|
||||
return null;
|
||||
}
|
||||
|
||||
if(!Str::contains($setting->webhook_endpoint, 'workflows')) {
|
||||
return MicrosoftTeamsMessage::create()
|
||||
->to($setting->webhook_endpoint)
|
||||
|
||||
Reference in New Issue
Block a user