|
@@ -75,7 +75,9 @@ class ONUSubscriber implements EventSubscriber
|
|
|
$entity = $args->getEntity();
|
|
|
if ($entity instanceof ONU) {
|
|
|
$this->em = $args->getEntityManager();
|
|
|
- $this->setServicePorts($entity);
|
|
|
+ if (!$entity->isDeleted()) {
|
|
|
+ $this->setServicePorts($entity);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -95,7 +97,10 @@ class ONUSubscriber implements EventSubscriber
|
|
|
$entity = $args->getEntity();
|
|
|
if ($entity instanceof ONU) {
|
|
|
$this->em = $args->getEntityManager();
|
|
|
- $this->setServicePorts($entity);
|
|
|
+
|
|
|
+ if (!$entity->isDeleted()) {
|
|
|
+ $this->setServicePorts($entity);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|