Fix issue with API

This commit is contained in:
James Cole 2018-04-14 09:38:58 +02:00
parent 67fa4a0fc7
commit 5862b832d9
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ class Controller extends BaseController
// do not expose API on demo site: // do not expose API on demo site:
if (true === $isDemoSite) { 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 // get global parameters

View File

@ -148,7 +148,7 @@ class AccountTransformer extends TransformerAbstract
$type = $account->accountType->type; $type = $account->accountType->type;
$role = $this->repository->getMetaValue($account, 'accountRole'); $role = $this->repository->getMetaValue($account, 'accountRole');
if (strlen($role) === 0 || $type !== AccountType::ASSET) { if ($type !== AccountType::ASSET || (string)$role === '') {
$role = null; $role = null;
} }
$currencyId = (int)$this->repository->getMetaValue($account, 'currency_id'); $currencyId = (int)$this->repository->getMetaValue($account, 'currency_id');