diff --git a/app/Jobs/FolderDeleteMembership.php b/app/Jobs/FolderDeleteMembership.php index 7c936bf..8097188 100644 --- a/app/Jobs/FolderDeleteMembership.php +++ b/app/Jobs/FolderDeleteMembership.php @@ -51,6 +51,7 @@ public function handle(): void } $pathToFile = $federation->name.'/'.$entity->file; if(! Storage::disk($diskName)->exists($pathToFile)) { + NotificationService::sendEntityNotification($entity, new MembershipRejected($entity->entityid, $federation->name)); return; } @@ -62,7 +63,6 @@ public function handle(): void $lock->block(61); EntityFacade::deleteEntityMetadataFromFolder($entity->file, $federation->xml_id); - NotificationService::sendEntityNotification($entity, new MembershipRejected($entity->entityid, $federation->name)); RunMdaScript::dispatch($federation, $lock->owner()); } catch (Exception $e) {