1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00

fixes on MultiDB

This commit is contained in:
paulwer 2024-04-24 08:56:53 +02:00
parent 8378f9c1d1
commit 96d4a250cf

View File

@ -113,7 +113,7 @@ class MultiDB
{
if (!config('ninja.db.multi_db_enabled')) {
return Company::where("expense_mailbox", $expense_mailbox)->withTrashed()->exists();
return Company::where("expense_mailbox", $expense_mailbox)->exists();
}
if (in_array($expense_mailbox, self::$protected_expense_mailboxes)) {
@ -123,7 +123,7 @@ class MultiDB
$current_db = config('database.default');
foreach (self::$dbs as $db) {
if (Company::on($db)->where("expense_mailbox", $expense_mailbox)->withTrashed()->exists()) {
if (Company::on($db)->where("expense_mailbox", $expense_mailbox)->exists()) {
self::setDb($current_db);
return false;