Fixed saving SN in Cpeprovisioning
This commit is contained in:
@@ -222,6 +222,24 @@ class CpeprovisioningController extends mfBaseController {
|
||||
if($r->ont_sn) {
|
||||
$termination = new Termination($termination_id);
|
||||
$orig_sn = $termination->getWorkflowvalue("ont_sn", "string");
|
||||
|
||||
if($orig_sn === null) {
|
||||
|
||||
$sn_item = WorkflowitemModel::getFirst(["name" => "ont_sn", "object_type" => "termination"]);
|
||||
//var_dump($sn_item);exit;
|
||||
//var_dump(mfValuecache::singleton()->get("wfItemvalue-item-".$sn_item->id."-object-".$termination_id));exit;
|
||||
if(!$sn_item->id) {
|
||||
$this->log->error("ont_sn workflow item not found");
|
||||
} else {
|
||||
$sn_item->setObjectId($termination_id);
|
||||
$termination->workflowitems["ont_sn"] = $sn_item;
|
||||
//$sn_item->value->setValue($r->ont_sn);
|
||||
|
||||
//$sn_item->value->save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($r->ont_sn != $orig_sn) {
|
||||
$termination->workflowitems["ont_sn"]->value->setValue($r->ont_sn);
|
||||
$termination->workflowitems["ont_sn"]->value->save();
|
||||
|
||||
Reference in New Issue
Block a user