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 7a4e2792f1..d1f0199a47 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 @@ -304,8 +304,8 @@ function initLocalStore(collection: string, field: string, type: LocalType): voi $type: 'manyRelated', collection: collectionName, field: fieldName, - type: collectionExists(collectionName) - ? fieldsStore.getPrimaryKeyFieldForCollection(collectionName)?.type + type: collectionExists(collection) + ? fieldsStore.getPrimaryKeyFieldForCollection(collection)?.type : 'integer', schema: {}, });