mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 17:33:45 +00:00
Catch for #822
This commit is contained in:
@@ -210,6 +210,9 @@ class UpgradeDatabase extends Command
|
|||||||
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
||||||
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
||||||
->whereIn('account_types.type', [AccountType::DEFAULT, AccountType::ASSET])->first(['transactions.*']);
|
->whereIn('account_types.type', [AccountType::DEFAULT, AccountType::ASSET])->first(['transactions.*']);
|
||||||
|
if (is_null($transaction)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
$account = $transaction->account;
|
$account = $transaction->account;
|
||||||
$currency = $repository->find(intval($account->getMeta('currency_id')));
|
$currency = $repository->find(intval($account->getMeta('currency_id')));
|
||||||
@@ -251,7 +254,7 @@ class UpgradeDatabase extends Command
|
|||||||
*/
|
*/
|
||||||
public function updateTransferCurrencies()
|
public function updateTransferCurrencies()
|
||||||
{
|
{
|
||||||
$set = TransactionJournal
|
$set = TransactionJournal
|
||||||
::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
|
::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
|
||||||
->where('transaction_types.type', TransactionType::TRANSFER)
|
->where('transaction_types.type', TransactionType::TRANSFER)
|
||||||
->get(['transaction_journals.*']);
|
->get(['transaction_journals.*']);
|
||||||
|
Reference in New Issue
Block a user