From 82dd888f2fec1849d50ccf68e637636e6e5654be Mon Sep 17 00:00:00 2001 From: Mohamed Marrouchi Date: Tue, 24 Sep 2024 11:41:18 +0100 Subject: [PATCH] fix: getLanguageByCode() --- api/src/i18n/services/language.service.ts | 1 - frontend/src/components/nlp/components/NlpTrainForm.tsx | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/i18n/services/language.service.ts b/api/src/i18n/services/language.service.ts index 163efd14..c70bfca8 100644 --- a/api/src/i18n/services/language.service.ts +++ b/api/src/i18n/services/language.service.ts @@ -62,7 +62,6 @@ export class LanguageService extends BaseService { * * @returns A promise that resolves to the `Language` object. */ - @Cacheable(DEFAULT_LANGUAGE_CACHE_KEY) async getLanguageByCode(code: string) { return await this.findOne({ code }); } diff --git a/frontend/src/components/nlp/components/NlpTrainForm.tsx b/frontend/src/components/nlp/components/NlpTrainForm.tsx index 2a90e3b6..81cd097f 100644 --- a/frontend/src/components/nlp/components/NlpTrainForm.tsx +++ b/frontend/src/components/nlp/components/NlpTrainForm.tsx @@ -283,7 +283,9 @@ const NlpDatasetSample: FC = ({ label={t("label.language")} multiple={false} {...field} - onChange={(_e, selected) => onChange(selected?.code)} + onChange={(_e, selected) => { + onChange(selected?.code); + }} {...rest} /> );