Fix issue with API

This commit is contained in:
James Cole
2018-04-14 09:38:58 +02:00
parent 67fa4a0fc7
commit 5862b832d9
2 changed files with 2 additions and 2 deletions

View File

@@ -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');