Replace enum

This commit is contained in:
James Cole
2025-01-03 09:15:52 +01:00
parent 1787f4421b
commit a8ae496fda
57 changed files with 257 additions and 204 deletions

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Requests\Data\Export;
use FireflyIII\Enums\AccountTypeEnum;
use FireflyIII\Models\AccountType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Support\Request\ChecksLogin;
@@ -55,7 +56,7 @@ class ExportRequest extends FormRequest
$accountId = (int) $part;
if (0 !== $accountId) {
$account = $repository->find($accountId);
if (null !== $account && AccountType::ASSET === $account->accountType->type) {
if (null !== $account && AccountTypeEnum::ASSET->value === $account->accountType->type) {
$accounts->push($account);
}
}