Fixed not creating OAID in rimo-import when requested
This commit is contained in:
@@ -20,6 +20,7 @@ $me = new \User(TT_RIMO_IMPORT_USER_ID);
|
||||
|
||||
define("INTERNAL_USER_ID", $me->id);
|
||||
define("INTERNAL_USER_USERNAME", $me->username);
|
||||
define("MFBASE_BYPASS_LOGIN", true);
|
||||
|
||||
$mainlog = \mfLoghandler::singleton();
|
||||
$log = new \mfLog_File();
|
||||
@@ -311,6 +312,12 @@ foreach ($clusters as $cluster_data) {
|
||||
if (!$unit->save()) {
|
||||
die("Error saving new unit\n" . print_r($unit, true));
|
||||
}
|
||||
if(!$unit->oaid && $adb_netzgebiet->unit_create_oaid) {
|
||||
$unit->oaid = $unit->getNewOAID();
|
||||
if(!$unit->save()) {
|
||||
die("Error saving new unit OAID\n" . print_r($unit, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,6 +355,13 @@ foreach ($clusters as $cluster_data) {
|
||||
if (!$unit->save()) {
|
||||
die("Error saving new unit\n" . print_r($home, true));
|
||||
}
|
||||
if(!$unit->oaid && $adb_netzgebiet->unit_create_oaid) {
|
||||
$unit->oaid = $unit->getNewOAID();
|
||||
if(!$unit->save()) {
|
||||
die("Error saving new unit OAID\n" . print_r($unit, true));
|
||||
}
|
||||
}
|
||||
|
||||
$unit = new \ADBWohneinheit($unit->id);
|
||||
\mfValuecache::singleton()->set("adbhausnummer-save-nesting-level-".$hausnummer->id, 0);
|
||||
\mfValuecache::singleton()->set("adbwohneinheit-save-nesting-level-".$unit->id, 0);
|
||||
|
||||
Reference in New Issue
Block a user