Merge pull request #5969 from turbo124/v5-develop

Fixes for import json
This commit is contained in:
David Bomba 2021-06-08 22:59:06 +10:00 committed by GitHub
commit a1c00026e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,17 +164,18 @@ class CompanyImport implements ShouldQueue
$this->backup_file = json_decode(base64_decode($this->backup_file));
// nlog($this->backup_file);
$this->checkUserCount();
if(array_key_exists('import_settings', $this->request_array) && $this->request_array['import_settings'] == 'true') {
$this->checkUserCount()->preFlightChecks()->importSettings();
$this->preFlightChecks()->importSettings();
}
if(array_key_exists('import_data', $this->request_array) && $this->request_array['import_data'] == 'true') {
try{
$this->checkUserCount()
->preFlightChecks()
$this->preFlightChecks()
->purgeCompanyData()
->importData();
@ -208,7 +209,6 @@ class CompanyImport implements ShouldQueue
$company_owner = $this->company->owner();
if($this->company->account->isFreeHostedClient()){
nlog("This is a free account");
nlog("Backup user count = ".count($backup_users));
@ -268,7 +268,6 @@ class CompanyImport implements ShouldQueue
}
}
nlog($this->message);
nlog($this->pre_flight_checks_pass);