|
@@ -150,12 +150,15 @@ class ONURESTController extends RESTController
|
|
$cmd_args['transition'] = "--transition:{$transition}";
|
|
$cmd_args['transition'] = "--transition:{$transition}";
|
|
|
|
|
|
$serialNumbers = array();
|
|
$serialNumbers = array();
|
|
- foreach($onus as $onu) {
|
|
|
|
- $onuId = $onu->getId();
|
|
|
|
- $cmd_args['id'] = "--id:{$onuId}";
|
|
|
|
- $serialNumbers[$onuId] = $onu->getPonSerialNumber();
|
|
|
|
-
|
|
|
|
- $this->runCommand('workflow:apply', $cmd_args);
|
|
|
|
|
|
+ if($onus) {
|
|
|
|
+
|
|
|
|
+ foreach($onus as $onu) {
|
|
|
|
+ $onuId = $onu->getId();
|
|
|
|
+ $cmd_args['id'] = "--id:{$onuId}";
|
|
|
|
+ $serialNumbers[$onuId] = $onu->getPonSerialNumber();
|
|
|
|
+
|
|
|
|
+ $this->runCommand('workflow:apply', $cmd_args);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
return array('client' => $id, 'transition' => $transition, "count" => count($onus), 'onus' => $serialNumbers);
|
|
return array('client' => $id, 'transition' => $transition, "count" => count($onus), 'onus' => $serialNumbers);
|