Browse Source

Fixed the problem when insert a new ONU in Flowdat3

Jean Sumara 5 năm trước cách đây
mục cha
commit
12c1326303
1 tập tin đã thay đổi với 1 bổ sung3 xóa
  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());