diff --git a/app/src/modules/settings/routes/data-model/field-detail/store.ts b/app/src/modules/settings/routes/data-model/field-detail/store.ts index 57c89298d9..d100a079cf 100644 --- a/app/src/modules/settings/routes/data-model/field-detail/store.ts +++ b/app/src/modules/settings/routes/data-model/field-detail/store.ts @@ -376,18 +376,33 @@ function initLocalStore( } if (fieldExists(junctionCollection, manyRelated) === false) { - state.newFields.push({ - $type: 'manyRelated', - collection: junctionCollection, - field: manyRelated, - type: collectionExists(relatedCollection) - ? fieldsStore.getPrimaryKeyFieldForCollection(relatedCollection)?.type - : 'integer', - schema: {}, - meta: { - hidden: true, - }, - }); + if (type === 'translations') { + state.newFields.push({ + $type: 'manyRelated', + collection: junctionCollection, + field: manyRelated, + type: collectionExists(relatedCollection) + ? fieldsStore.getPrimaryKeyFieldForCollection(relatedCollection)?.type + : 'string', + schema: {}, + meta: { + hidden: true, + }, + }); + } else { + state.newFields.push({ + $type: 'manyRelated', + collection: junctionCollection, + field: manyRelated, + type: collectionExists(relatedCollection) + ? fieldsStore.getPrimaryKeyFieldForCollection(relatedCollection)?.type + : 'integer', + schema: {}, + meta: { + hidden: true, + }, + }); + } } if (collectionExists(relatedCollection) === false) {