Fixed creating customer_passive_finished wf value on save

This commit is contained in:
Frank Schubert
2021-11-30 19:43:37 +01:00
parent a866c9e7c3
commit af82db73cf
2 changed files with 4 additions and 4 deletions

View File

@@ -248,8 +248,10 @@ class LineworkController extends mfBaseController {
}
$item = WorkflowitemModel::getFirst(["name" => "customer_passive_finished", "object_type" => "termination"]);
if(!$item->value) {
$item->setObjectId($termination_id);
$item->setObjectId($termination_id);
if(!$item->value->id) {
$this->log->debug(__CLASS__."::save(): creating new value 0 for workflowitem because value of customer_passive_finished does not exist yet");
$item->value->value_int = 0;
$item->value->save();
}