Skip to content

Commit 9e8f161

Browse files
committed
fixes multiple sheet import
1 parent f361977 commit 9e8f161

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/app/Services/Importers/Import.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private function queueChunks()
9999

100100
private function prepareChunk()
101101
{
102-
$this->dataImport->update(['chunks' => $this->dataImport->chunks + 1]);
102+
$this->dataImport->increment('chunks');
103103

104104
$this->chunk = collect();
105105

@@ -112,8 +112,10 @@ private function prepareChunk()
112112

113113
$this->rowIterator->next();
114114

115-
if ($this->fileHasFinished()) {
116-
$this->dataImport->update(['file_parsed' => true]);
115+
if ($this->sheetHasFinished()) {
116+
if ($this->fileHasFinished()) {
117+
$this->dataImport->update(['file_parsed' => true]);
118+
}
117119

118120
break;
119121
}

0 commit comments

Comments
 (0)