mirror of
https://github.com/hexastack/hexabot
synced 2025-01-22 10:35:37 +00:00
fix: getLanguageByCode()
This commit is contained in:
parent
ecb8d9745a
commit
82dd888f2f
@ -62,7 +62,6 @@ export class LanguageService extends BaseService<Language> {
|
||||
*
|
||||
* @returns A promise that resolves to the `Language` object.
|
||||
*/
|
||||
@Cacheable(DEFAULT_LANGUAGE_CACHE_KEY)
|
||||
async getLanguageByCode(code: string) {
|
||||
return await this.findOne({ code });
|
||||
}
|
||||
|
@ -283,7 +283,9 @@ const NlpDatasetSample: FC<NlpDatasetSampleProps> = ({
|
||||
label={t("label.language")}
|
||||
multiple={false}
|
||||
{...field}
|
||||
onChange={(_e, selected) => onChange(selected?.code)}
|
||||
onChange={(_e, selected) => {
|
||||
onChange(selected?.code);
|
||||
}}
|
||||
{...rest}
|
||||
/>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user