Skip to content

Commit 620c029

Browse files
committed
Take only 3 cats
1 parent 60b1d15 commit 620c029

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Packages/Application/Psmb.PsmbImport/Classes/Command/SermonCommandController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ public function assignCategoriesCommand(
130130
// --- Process Sermons ---
131131
foreach ($sermonsData as $sermonEntry) {
132132
$hash = $sermonEntry['id'] ?? null;
133-
$categoryNames = $sermonEntry['categories'] ?? [];
133+
$categoryNamesOriginal = $sermonEntry['categories'] ?? [];
134+
$categoryNames = array_slice($categoryNamesOriginal, 0, 3);
134135

135136
if (!$hash || empty($categoryNames)) {
136137
$this->logger->log(sprintf('Skipping entry due to missing hash or categories: %s', json_encode($sermonEntry, JSON_UNESCAPED_UNICODE)));

0 commit comments

Comments
 (0)