mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
(model) skip save on migration when defaults lead to inconsistent data, closes https://github.com/opnsense/core/issues/1149
This commit is contained in:
parent
daca31be0d
commit
cdfc85fde9
@ -559,7 +559,11 @@ abstract class BaseModel
|
||||
// serialize to config after last migration step, keep the config data static as long as not all
|
||||
// migrations have completed.
|
||||
if ($upgradePerfomed) {
|
||||
$this->serializeToConfig();
|
||||
try {
|
||||
$this->serializeToConfig();
|
||||
} catch (\Exception $e) {
|
||||
$logger->error("Model ".$class_info->getName() ." can't be saved, skip ( " .$e . " )");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user