Commit a1eff84f authored by Chivy Lim's avatar Chivy Lim

Merge branch 'KIME-4583' into 'master'

[BUGFIX] Store deleted count on import

refs KIME-4583

See merge request !16
parents 4269a602 f03e6271
...@@ -244,12 +244,11 @@ class SpreadsheetImportService { ...@@ -244,12 +244,11 @@ class SpreadsheetImportService {
$this->persistenceManager->persistAll(); $this->persistenceManager->persistAll();
} }
} }
$deleteCount = 0;
if ($this->spreadsheetImport->isDeleting()) { if ($this->spreadsheetImport->isDeleting()) {
$notExistingObjects = $this->findObjectsByArgumentsAndExcludedIds($processedObjectIds); $notExistingObjects = $this->findObjectsByArgumentsAndExcludedIds($processedObjectIds);
foreach ($notExistingObjects as $object) { foreach ($notExistingObjects as $object) {
$objectRepository->remove($object); $objectRepository->remove($object);
if (++$deleteCount % $persistRecordsChunkSize === 0) { if (++$totalDeleted % $persistRecordsChunkSize === 0) {
$this->persistenceManager->persistAll(); $this->persistenceManager->persistAll();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment