Browse Source

fix: pass project role as owner in airtable import

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/6318/head
Pranav C 1 year ago
parent
commit
b11f48f1cf
  1. 12
      packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts

12
packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts

@ -745,7 +745,7 @@ export class AtImportProcessor {
const srcTbl: any = const srcTbl: any =
await this.tablesService.getTableWithAccessibleViews({ await this.tablesService.getTableWithAccessibleViews({
tableId: srcTableId, tableId: srcTableId,
user: syncDB.user, user: { ...syncDB.user, project_roles: { owner: true } },
}); });
recordPerfStats(_perfStart, 'dbTable.read'); recordPerfStats(_perfStart, 'dbTable.read');
@ -829,7 +829,7 @@ export class AtImportProcessor {
const childTblSchema: any = const childTblSchema: any =
await this.tablesService.getTableWithAccessibleViews({ await this.tablesService.getTableWithAccessibleViews({
tableId: ncLinkMappingTable[x].nc.childId, tableId: ncLinkMappingTable[x].nc.childId,
user: syncDB.user, user: { ...syncDB.user, project_roles: { owner: true } }
}); });
recordPerfStats(_perfStart, 'dbTable.read'); recordPerfStats(_perfStart, 'dbTable.read');
@ -837,7 +837,7 @@ export class AtImportProcessor {
const parentTblSchema: any = const parentTblSchema: any =
await this.tablesService.getTableWithAccessibleViews({ await this.tablesService.getTableWithAccessibleViews({
tableId: ncLinkMappingTable[x].nc.parentId, tableId: ncLinkMappingTable[x].nc.parentId,
user: syncDB.user, user: { ...syncDB.user, project_roles: { owner: true } },
}); });
recordPerfStats(_perfStart, 'dbTable.read'); recordPerfStats(_perfStart, 'dbTable.read');
@ -1854,7 +1854,7 @@ export class AtImportProcessor {
const _perfStart = recordPerfStart(); const _perfStart = recordPerfStart();
const ncTbl: any = await this.tablesService.getTableWithAccessibleViews({ const ncTbl: any = await this.tablesService.getTableWithAccessibleViews({
tableId: tblId, tableId: tblId,
user: syncDB.user, user: { ...syncDB.user, project_roles: { owner: true } },
}); });
recordPerfStats(_perfStart, 'dbTable.read'); recordPerfStats(_perfStart, 'dbTable.read');
@ -2348,7 +2348,7 @@ export class AtImportProcessor {
const ncTbl: any = const ncTbl: any =
await this.tablesService.getTableWithAccessibleViews({ await this.tablesService.getTableWithAccessibleViews({
tableId: ncTblList.list[i].id, tableId: ncTblList.list[i].id,
user: syncDB.user, user: { ...syncDB.user, project_roles: { owner: true } },
}); });
recordPerfStats(_perfStart, 'dbTable.read'); recordPerfStats(_perfStart, 'dbTable.read');
@ -2383,7 +2383,7 @@ export class AtImportProcessor {
const ncTbl: any = const ncTbl: any =
await this.tablesService.getTableWithAccessibleViews({ await this.tablesService.getTableWithAccessibleViews({
tableId: ncTblList.list[i].id, tableId: ncTblList.list[i].id,
user: syncDB.user, user: { ...syncDB.user, project_roles: { owner: true } },
}); });
rtc.data.nestedLinks += await importLTARData({ rtc.data.nestedLinks += await importLTARData({

Loading…
Cancel
Save