Skip to content

Commit d275b56

Browse files
authored
Fix preloading of relation missing on Tag albums (#3445)
1 parent a51e645 commit d275b56

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/Factories/AlbumFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function findBaseAlbumOrFail(string $album_id, bool $with_relations = tru
9797

9898
if ($with_relations) {
9999
$album_query->with(['access_permissions', 'photos', 'children', 'children.owner', 'photos.size_variants', 'photos.statistics', 'photos.palette']);
100-
$tag_album_query->with(['photos']);
100+
$tag_album_query->with(['photos', 'photos.size_variants', 'photos.statistics', 'photos.palette']);
101101
}
102102

103103
$ret = $album_query->find($album_id) ?? $tag_album_query->find($album_id);
@@ -165,8 +165,8 @@ public function findBaseAlbumsOrFail(array $album_ids, bool $with_relations = tr
165165
$album_query = Album::query();
166166

167167
if ($with_relations) {
168-
$tag_album_query->with(['photos']);
169-
$album_query->with(['photos', 'children', 'photos.size_variants']);
168+
$tag_album_query->with(['photos', 'photos.size_variants', 'photos.statistics', 'photos.palette']);
169+
$album_query->with(['photos', 'children', 'photos.size_variants', 'photos.statistics', 'photos.palette']);
170170
}
171171

172172
/** @var ($albums_only is true ? array<int,Album> : array<int,TagAlbum>) */

0 commit comments

Comments
 (0)