Skip to content

Commit b0cdfc4

Browse files
zigzagdevclaude
andcommitted
feat: prefer main_image_url for thumbnail_url in AlgoliaImportWorldHeritages
Switches the Algolia object's thumbnail_url to main_image_url first, falling back to images[0]->url, so the search index mirrors the new fallback semantics now used by WorldHeritageViewModel and WorldHeritageDtoCollection::toSummaryArray. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 16cca0b commit b0cdfc4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/app/Console/Commands/AlgoliaImportWorldHeritages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function handle(): int
138138
'year_inscribed' => $row->year_inscribed !== null ? (int) $row->year_inscribed : null,
139139
'is_endangered' => (bool) $row->is_endangered,
140140
'main_image_url' => $row->main_image_url,
141-
'thumbnail_url' => $row->images->first()?->url,
141+
'thumbnail_url' => $row->main_image_url ?? $row->images->first()?->url,
142142
'state_party_codes' => $statePartyCodes,
143143
'country_names_jp' => $countryCount > 1 ? $countryNamesJp : [],
144144
];

0 commit comments

Comments
 (0)