|
@@ -87,10 +87,7 @@ class ONUSubscriber implements EventSubscriber
|
|
|
try{
|
|
|
$entity = $args->getEntity();
|
|
|
if($entity instanceof ONU){
|
|
|
- $dm = $this->containerInterface->get("doctrine")->getManager();
|
|
|
- $uow = $dm->getUnitOfWork();
|
|
|
- $originalEntity = $uow->getOriginalEntityData($entity);
|
|
|
- if($originalEntity['clientId'] != $entity->getClientId()){
|
|
|
+ if(isset($args->getEntityChangeSet()['clientId']) && $args->getOldValue('clientId') != $entity->getClientId()){
|
|
|
$this->setStateOnu($entity);
|
|
|
}
|
|
|
}
|