Minor fixes

This commit is contained in:
David Bomba 2023-04-22 15:25:54 +10:00
parent cceadda985
commit e463613a4c
2 changed files with 11 additions and 2 deletions

View File

@ -11,11 +11,12 @@
namespace App\Console\Commands;
use App\Libraries\MultiDB;
use App\Utils\Ninja;
use App\Models\Backup;
use App\Models\Client;
use App\Models\Company;
use App\Models\Document;
use App\Libraries\MultiDB;
use App\Models\GroupSetting;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
@ -55,6 +56,9 @@ class BackupUpdate extends Command
{
//always return state to first DB
if(Ninja::isSelfHost())
return;
$current_db = config('database.default');
if (! config('ninja.db.multi_db_enabled')) {

View File

@ -329,8 +329,13 @@ class Email implements ShouldQueue
*/
public function preFlightChecksFail(): bool
{
/* Always send if disabled */
if($this->override) {
return false;
}
/* If we are migrating data we don't want to fire any emails */
if ($this->company->is_disabled && !$this->override) {
if ($this->company->is_disabled) {
return true;
}