Deactivate auditing for import and increase max_execution_time

This commit is contained in:
Constantin Graf
2024-09-12 14:22:25 +02:00
committed by Constantin Graf
parent cc10af0b97
commit 0a0b7a03b4
14 changed files with 49 additions and 22 deletions

View File

@@ -98,6 +98,7 @@ class ImportDatabaseHelper
throw new ImportException('Invalid data: '.implode(', ', $validator->errors()->all()));
}
/** @var TModel $model */
$model = new $this->model;
foreach ($data as $key => $value) {
$model->{$key} = $value;
@@ -105,6 +106,9 @@ class ImportDatabaseHelper
if ($this->beforeSave !== null) {
($this->beforeSave)($model);
}
if (method_exists($model, 'disableAuditing')) {
$model->disableAuditing();
}
$model->save();
if ($this->afterCreate !== null) {