Skip to content

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

chore: add comments explaining LTAR meta fallback strategy

Pranav172801a1865f
diff --git a/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasTable.ts b/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasTable.ts
index a2752acc26..3d832729bf 100644
--- a/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasTable.ts
+++ b/packages/nc-gui/components/smartsheet/grid/canvas/composables/useCanvasTable.ts
@@ -1462,6 +1462,9 @@ export function useCanvasTable({
await Promise.all(
metaIdsToFetch.map(async ([colId, tableId, relatedBaseId]) => {
if (!tableId || !relatedBaseId) return
+ // Try fetching full table meta first. If it fails (e.g., user lacks permission
+ // to access the related table), fall back to partial meta which only fetches
+ // the linked column metadata needed to render the LTAR cell.
try {
await getMeta(relatedBaseId, tableId, false, false, true)
} catch {}
diff --git a/packages/nc-gui/composables/useLTARStore.ts b/packages/nc-gui/composables/useLTARStore.ts
index 7101724b0f..257eefe318 100644
--- a/packages/nc-gui/composables/useLTARStore.ts
+++ b/packages/nc-gui/composables/useLTARStore.ts
@@ -163,6 +163,10 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
const tableId = colOptions.value.fk_related_model_id as string
const colId = colOptions.value.fk_column_id as string
+
+ // Try fetching full table meta first. If it fails (e.g., user lacks permission
+ // to access the related table), fall back to partial meta which only fetches
+ // the linked column metadata needed to render the LTAR cell.
try {
await getMeta(relatedBaseId, tableId, false, false, true)
} catch {}