Skip to content

Commit

Permalink
Merge pull request #134 from mfickers/feature/reset-between-imports
Browse files Browse the repository at this point in the history
Reset import model between imports
  • Loading branch information
sprankhub authored Feb 27, 2023
2 parents 9c08e87 + d36a10a commit 0a7bdd2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Model/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function __construct(
*/
public function processImport(array $dataArray): void
{
$this->resetImportModel();
$this->validateData($dataArray);
$this->importData();
}
Expand Down Expand Up @@ -111,6 +112,11 @@ public function getImportModel(): Import
return $this->importModel;
}

private function resetImportModel(): void
{
$this->importModel = null;
}

public function getErrorAggregator(): ProcessingErrorAggregatorInterface
{
return $this->getImportModel()->getErrorAggregator();
Expand Down

0 comments on commit 0a7bdd2

Please sign in to comment.