Fixes for bug that sends multiple emails per import

This commit is contained in:
David Bomba 2022-06-01 07:49:33 +10:00
parent 978884f2ee
commit 55e7c8b000
8 changed files with 9 additions and 10 deletions

View File

@ -562,7 +562,7 @@ class BaseImport
} }
} }
protected function finalizeImport() public function finalizeImport()
{ {
$data = [ $data = [
'errors' => $this->error_array, 'errors' => $this->error_array,

View File

@ -60,10 +60,7 @@ class Csv extends BaseImport implements ImportInterface
) { ) {
$this->{$entity}(); $this->{$entity}();
} }
//collate any errors
$this->finalizeImport();
} }
public function client() public function client()

View File

@ -41,7 +41,7 @@ class Freshbooks extends BaseImport
//collate any errors //collate any errors
$this->finalizeImport(); // $this->finalizeImport();
} }
public function client() public function client()

View File

@ -39,7 +39,7 @@ class Invoice2Go extends BaseImport
//collate any errors //collate any errors
$this->finalizeImport(); // $this->finalizeImport();
} }

View File

@ -38,7 +38,7 @@ class Invoicely extends BaseImport
//collate any errors //collate any errors
$this->finalizeImport(); // $this->finalizeImport();
} }
public function client() public function client()

View File

@ -54,7 +54,7 @@ class Wave extends BaseImport implements ImportInterface
//collate any errors //collate any errors
$this->finalizeImport(); // $this->finalizeImport();
} }
public function client() public function client()

View File

@ -40,7 +40,7 @@ class Zoho extends BaseImport
//collate any errors //collate any errors
$this->finalizeImport(); // $this->finalizeImport();
} }
public function client() public function client()

View File

@ -79,6 +79,8 @@ class CSVIngest implements ShouldQueue {
} }
$engine->finalizeImport();
$this->checkContacts(); $this->checkContacts();
} }