Fix tests.

This commit is contained in:
James Cole
2018-07-22 17:06:10 +02:00
parent a722dc4235
commit ea2c48bca5
8 changed files with 20 additions and 16 deletions

View File

@@ -467,10 +467,14 @@ class AccountController extends Controller
/** @var CurrencyRepositoryInterface $repository */
$repository = app(CurrencyRepositoryInterface::class);
$default = app('amount')->getDefaultCurrency();
$chartData = [];
/** @var AccountRepositoryInterface $accountRepos */
$accountRepos = app(AccountRepositoryInterface::class);
$default = app('amount')->getDefaultCurrency();
$chartData = [];
/** @var Account $account */
foreach ($accounts as $account) {
$currency = $repository->findNull((int)$account->getMeta('currency_id'));
$currency = $repository->findNull((int)$accountRepos->getMetaValue($account, 'currency_id'));
if (null === $currency) {
$currency = $default;
}