Sfoglia il codice sorgente

Fixed the problem when insert a new ONU in Flowdat3

Jean Sumara 5 anni fa
parent
commit
12c1326303
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  1. 1 3
      src/FTTHBundle/EventListener/ONUSubscriber.php

+ 1 - 3
src/FTTHBundle/EventListener/ONUSubscriber.php

@@ -87,9 +87,7 @@ class ONUSubscriber implements EventSubscriber
         try{
             $entity = $args->getEntity();
             if($entity instanceof ONU){
-                if(isset($args->getEntityChangeSet()['clientId']) && $args->getOldValue('clientId') != $entity->getClientId()){
-                    $this->setStateOnu($entity);
-                }
+                $this->setStateOnu($entity);
             }
         }catch(Exception $ex){
             ExceptionFactory::make($ex->getMessage());