Skip to content

Commit fc5e4b7

Browse files
committed
feat: set word id
#2113
1 parent 30853d0 commit fc5e4b7

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/main/java/ai/elimu/util/csv/CsvAnalyticsExtractionHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ public static List<WordLearningEvent> extractWordLearningEvents(File csvFile) {
437437
wordLearningEvent.setWordText(wordText);
438438

439439
Long wordId = Long.valueOf(csvRecord.get("word_id"));
440-
// wordLearningEvent.setWordId(wordId);
440+
wordLearningEvent.setWordId(wordId);
441441

442442
wordLearningEvents.add(wordLearningEvent);
443443
}

src/main/java/ai/elimu/web/servlet/CustomDispatcherServlet.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,10 @@ private void populateDatabase(WebApplicationContext webApplicationContext) {
377377
wordLearningEvent.setPackageName("ai.elimu.maneno");
378378
if (Math.random() > 0.5) {
379379
wordLearningEvent.setWordText(wordMAA.getText());
380-
// wordLearningEvent.setWordId(wordMAA.getId());
381-
// TODO: https://github.com/elimu-ai/webapp/issues/2113
380+
wordLearningEvent.setWordId(wordMAA.getId());
382381
} else {
383382
wordLearningEvent.setWordText(wordSAAM.getText());
384-
// wordLearningEvent.setWordId(wordSAAM.getId());
385-
// TODO: https://github.com/elimu-ai/webapp/issues/2113
383+
wordLearningEvent.setWordId(wordSAAM.getId());
386384
}
387385
wordLearningEvent.setLearningEventType(LearningEventType.WORD_PRESSED);
388386
wordLearningEventDao.create(wordLearningEvent);

0 commit comments

Comments
 (0)