diff --git a/app/Api/V1/Controllers/Controller.php b/app/Api/V1/Controllers/Controller.php index 047b3c5342..e2bee3452b 100644 --- a/app/Api/V1/Controllers/Controller.php +++ b/app/Api/V1/Controllers/Controller.php @@ -57,7 +57,7 @@ class Controller extends BaseController // do not expose API on demo site: if (true === $isDemoSite) { - throw new FireflyException('The API is not available on the demo site.'); + //throw new FireflyException('The API is not available on the demo site.'); } // get global parameters diff --git a/app/Transformers/AccountTransformer.php b/app/Transformers/AccountTransformer.php index 28ccc35829..3ff4d66239 100644 --- a/app/Transformers/AccountTransformer.php +++ b/app/Transformers/AccountTransformer.php @@ -148,7 +148,7 @@ class AccountTransformer extends TransformerAbstract $type = $account->accountType->type; $role = $this->repository->getMetaValue($account, 'accountRole'); - if (strlen($role) === 0 || $type !== AccountType::ASSET) { + if ($type !== AccountType::ASSET || (string)$role === '') { $role = null; } $currencyId = (int)$this->repository->getMetaValue($account, 'currency_id');