Fixes for pre flight checks:

This commit is contained in:
David Bomba 2021-06-08 15:05:51 +10:00
parent 403479a11b
commit b8db1d5d22

View File

@ -165,14 +165,15 @@ class CompanyImport implements ShouldQueue
// nlog($this->backup_file); // nlog($this->backup_file);
if(array_key_exists('import_settings', $this->request_array) && $this->request_array['import_settings'] == 'true') { if(array_key_exists('import_settings', $this->request_array) && $this->request_array['import_settings'] == 'true') {
$this->preFlightChecks()->importSettings(); $this->checkUserCount()->preFlightChecks()->importSettings();
} }
if(array_key_exists('import_data', $this->request_array) && $this->request_array['import_data'] == 'true') { if(array_key_exists('import_data', $this->request_array) && $this->request_array['import_data'] == 'true') {
try{ try{
$this->preFlightChecks() $this->checkUserCount()
->preFlightChecks()
->purgeCompanyData() ->purgeCompanyData()
->importData(); ->importData();
@ -277,8 +278,6 @@ class CompanyImport implements ShouldQueue
//perform some magic here //perform some magic here
} }
$this->checkUserCount();
if(!$this->pre_flight_checks_pass) if(!$this->pre_flight_checks_pass)
{ {
$nmo = new NinjaMailerObject; $nmo = new NinjaMailerObject;