mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Finished journal repository.
This commit is contained in:
@@ -379,14 +379,19 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
$to = Account::find($data['account_to_id']);
|
||||
break;
|
||||
}
|
||||
if (is_null($to->id)) {
|
||||
if (is_null($to) || (!is_null($to) && is_null($to->id))) {
|
||||
Log::error('"to"-account is null, so we cannot continue!');
|
||||
App::abort(500, '"to"-account is null, so we cannot continue!');
|
||||
// @codeCoverageIgnoreStart
|
||||
}
|
||||
if (is_null($from->id)) {
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
if (is_null($from) || (!is_null($from) && is_null($from->id))) {
|
||||
Log::error('"from"-account is null, so we cannot continue!');
|
||||
App::abort(500, '"from"-account is null, so we cannot continue!');
|
||||
// @codeCoverageIgnoreStart
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return [$from, $to];
|
||||
}
|
||||
|
Reference in New Issue
Block a user