diff --git a/application/Preorder/Preorder.php b/application/Preorder/Preorder.php index b52634dfa..3e3f9fb98 100644 --- a/application/Preorder/Preorder.php +++ b/application/Preorder/Preorder.php @@ -1542,9 +1542,10 @@ class Preorder extends mfBaseModel { if($hausnummer && $hausnummer->id) { mfValuecache::singleton()->set("mfObjectmodel-adb_hausnummer-" . $this->adb_hausnummer_id, $hausnummer); $this->adb_hausnummer = $hausnummer; + return $this->adb_hausnummer; } - return $this->adb_hausnummer; + return new ADBHausnummer(); } if($name == "adb_wohneinheit") { @@ -1555,9 +1556,10 @@ class Preorder extends mfBaseModel { if($wohneinheit && $wohneinheit->id) { mfValuecache::singleton()->set("mfObjectmodel-adb_wohneinheit-" . $this->adb_wohneinheit_id, $wohneinheit); $this->adb_wohneinheit = $wohneinheit; + return $this->adb_wohneinheit; } - return $this->adb_wohneinheit; + return new ADBWohneinheit(); } if($name == "services") {