mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 08:04:40 -04:00
Force DB Connection for transactions
This commit is contained in:
parent
0e01b376e4
commit
8bc58a7e2c
@ -110,7 +110,7 @@ class Statement
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->rollback) {
|
if ($this->rollback) {
|
||||||
DB::rollBack();
|
\DB::connection(config('database.default'))->rollBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -129,7 +129,8 @@ class Statement
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (\is_null($this->entity)) {
|
if (\is_null($this->entity)) {
|
||||||
DB::beginTransaction();
|
\DB::connection(config('database.default'))->beginTransaction();
|
||||||
|
|
||||||
$this->rollback = true;
|
$this->rollback = true;
|
||||||
|
|
||||||
$invoice = InvoiceFactory::create($this->client->company->id, $this->client->user->id);
|
$invoice = InvoiceFactory::create($this->client->company->id, $this->client->user->id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user