diff --git a/scripts/adb-rimo-import/rimo-import.php b/scripts/adb-rimo-import/rimo-import.php index 6ec90cb93..8758e8d85 100755 --- a/scripts/adb-rimo-import/rimo-import.php +++ b/scripts/adb-rimo-import/rimo-import.php @@ -483,8 +483,8 @@ foreach ($clusters as $cluster_data) { if(property_exists($service, "customerState") && is_object($service->customerState) && property_exists($service->customerState, "userLabel") && strtolower($service->customerState->userLabel) == "active") { // active => order 500 $preorder = \PreorderModel::getFirst(["adb_wohneinheit_id" => $unit->id]); - $preorder->resetSaveNesting(); if($preorder) { + $preorder->resetSaveNesting(); $new_status = \PreorderstatusModel::getFirst(["code" => 500]); if($new_status) { if($preorder->status->code < $new_status->code) {