diff --git a/src/Command/CreateProductionCommand.php b/src/Command/CreateProductionCommand.php index 0cf76c2..7145d14 100644 --- a/src/Command/CreateProductionCommand.php +++ b/src/Command/CreateProductionCommand.php @@ -71,6 +71,15 @@ class CreateProductionCommand extends Command $term->getKanji(), SentenceNote::MODEL_NAME, )); + + if (count($noteIds) <= 0) { + $noteIds = $this->ankiService->findNotesIds(sprintf( + '"VocabKanji:*%s*" "note:%s"', + $term->getKanji(), + SentenceNote::MODEL_NAME, + )); + } + $sNote = $this->ankiService->getNote($noteIds[array_key_last($noteIds)]); $newSlNote = SentenceListeningNote::fromNote($sNote, $term);