Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: metadata retrieval in LTAR store by adding partial meta support

Pranavc0981e1fc90b
diff --git a/packages/nc-gui/composables/useLTARStore.ts b/packages/nc-gui/composables/useLTARStore.ts
index 2e91c61d6c..7101724b0f 100644
--- a/packages/nc-gui/composables/useLTARStore.ts
+++ b/packages/nc-gui/composables/useLTARStore.ts
@@ -41,7 +41,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
}
// state
- const { getMeta, getMetaByKey } = useMetas()
+ const { getMeta, getMetaByKey, getPartialMeta, metas } = useMetas()
const { base, sqlUis } = storeToRefs(useBase())
@@ -161,7 +161,15 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
return
}
- await getMeta(relatedBaseId, colOptions.value.fk_related_model_id as string)
+ const tableId = colOptions.value.fk_related_model_id as string
+ const colId = colOptions.value.fk_column_id as string
+ try {
+ await getMeta(relatedBaseId, tableId, false, false, true)
+ } catch {}
+ const metaKey = `${relatedBaseId}:${tableId}`
+ if (!metas.value[metaKey]) {
+ await getPartialMeta(relatedBaseId, colId, tableId)
+ }
if (isPublic.value) return