Fixed saving SN in Cpeprovisioning

This commit is contained in:
Frank Schubert
2022-09-06 19:09:42 +02:00
parent 952f25797d
commit c00d2751cc
3 changed files with 25 additions and 3 deletions

View File

@@ -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();