From 6dae814a28ddc742342d99b3d5e4bb9b7b954722 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 11 Jul 2024 09:34:23 +0300 Subject: [PATCH 1/3] Minor change to health check to support older Flutter apps --- app/Utils/SystemHealth.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Utils/SystemHealth.php b/app/Utils/SystemHealth.php index c415d36903d4..e24190fdd341 100644 --- a/app/Utils/SystemHealth.php +++ b/app/Utils/SystemHealth.php @@ -83,6 +83,7 @@ class SystemHealth 'pdf_engine' => (string) self::getPdfEngine(), 'queue' => (string) config('queue.default'), 'queue_data' => self::checkQueueData(), + 'jobs_pending' => 0, // TODO for backwards compatibility, remove once Flutter AP is updated 'trailing_slash' => (bool) self::checkUrlState(), 'file_permissions' => (string) ($check_file_system ? self::checkFileSystem() : ''), 'exchange_rate_api_not_configured' => (bool)self::checkCurrencySanity(), From ec968c6357f72e9e201efa6c70ef234e9b9dd104 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 11 Jul 2024 10:15:24 +0300 Subject: [PATCH 2/3] Fix for 'Table ninja.accounts doesn't exist' --- .gitignore | 1 + app/Http/Controllers/BaseController.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0b3c53481c27..3dc6d9df0f63 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ npm-debug.log yarn-error.log local_version.txt .env +.env.bak .phpunit.result.cache _ide_helper.php diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index 74934925da28..93a55c6adf6f 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -35,6 +35,7 @@ use League\Fractal\Resource\Item; use App\Models\BankTransactionRule; use Illuminate\Support\Facades\Auth; use App\Transformers\ArraySerializer; +use Illuminate\Support\Facades\Schema as DbSchema; use App\Transformers\EntityTransformer; use League\Fractal\Resource\Collection; use Illuminate\Database\Eloquent\Builder; @@ -1106,7 +1107,7 @@ class BaseController extends Controller public function flutterRoute() { - if ((bool) $this->checkAppSetup() !== false && $account = Account::first()) { + if ((bool) $this->checkAppSetup() !== false && DbSchema::hasTable('accounts') && $account = Account::first()) { /** @var \App\Models\Account $account */ From a10e65d38212ca4a2e99bf3323b02942df6788f9 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 11 Jul 2024 11:40:19 +0300 Subject: [PATCH 3/3] Rollback .gitignore change --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3dc6d9df0f63..0b3c53481c27 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,6 @@ npm-debug.log yarn-error.log local_version.txt .env -.env.bak .phpunit.result.cache _ide_helper.php