1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #5831 from turbo124/v5-develop

Fixes for import
This commit is contained in:
David Bomba 2021-05-26 20:10:40 +10:00 committed by GitHub
commit e0b1504ef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1654,6 +1654,8 @@ class Import implements ShouldQueue
{
$current_db = config('database.default');
nlog($this->company);
$local_company = Company::on($current_db)->where('company_key', $this->company->company_key)->first();
MultiDB::setDb('db-ninja-01');
@ -1692,7 +1694,7 @@ class Import implements ShouldQueue
private function processNinjaTokens(array $data)
{
$current_db = config('database.default');
$local_company = Company::find($this->company->id);
$local_company = Company::on($current_db)->where('company_key', $this->company->company_key)->first();
MultiDB::setDb('db-ninja-01');