Fix #10854 and another issue (again).

This commit is contained in:
James Cole
2025-09-15 19:20:51 +02:00
parent f512e6724e
commit ecfb3e2f95
6 changed files with 72 additions and 86 deletions

View File

@@ -370,8 +370,11 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface,
public function getTagObjects(int $journalId): Collection
{
/** @var TransactionJournal $journal */
/** @var TransactionJournal|null $journal */
$journal = $this->user->transactionJournals()->find($journalId);
if(null ===$journal) {
return new Collection();
}
return $journal->tags()->whereNull('deleted_at')->get();
}