mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-03 20:56:21 +00:00
Fix query for attachment icon.
This commit is contained in:
@@ -961,7 +961,12 @@ class GroupCollector implements GroupCollectorInterface
|
|||||||
// join some extra tables:
|
// join some extra tables:
|
||||||
$this->hasJoinedAttTables = true;
|
$this->hasJoinedAttTables = true;
|
||||||
$this->query->leftJoin('attachments', 'attachments.attachable_id', '=', 'transaction_journals.id')
|
$this->query->leftJoin('attachments', 'attachments.attachable_id', '=', 'transaction_journals.id')
|
||||||
->where('attachments.attachable_type', TransactionJournal::class);
|
->where(
|
||||||
|
static function (EloquentBuilder $q1) {
|
||||||
|
$q1->where('attachments.attachable_type', TransactionJournal::class);
|
||||||
|
$q1->orWhereNull('attachments.attachable_type');
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user