Skip to content

Commit ef1d545

Browse files
committed
fix feedCategoryTranslations not accepting existing strings
1 parent 742e879 commit ef1d545

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adminforth/plugins/i18n/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,9 @@ JSON.stringify(strings.reduce((acc: object, s: { en_string: string }): object =>
772772
await Promise.all(missingKeysDeduplicated.map(async (missingKey: any) => {
773773
const key = missingKey.en_string;
774774
const source = missingKey.source;
775-
const exists = await adminforth.resource(this.resourceConfig.resourceId).count(Filters.EQ(this.enFieldName, key));
775+
const exists = await adminforth.resource(this.resourceConfig.resourceId).count([
776+
Filters.EQ(this.enFieldName, key), Filters.EQ(this.options.categoryFieldName, category)
777+
]);
776778
if (exists) {
777779
return;
778780
}

0 commit comments

Comments
 (0)