Browse Source

Possible fix for API requests with wrong baseID ("undefined").

pull/4633/head
Semjon Geist 2 years ago
parent
commit
a986c10e37
  1. 2
      packages/nocodb/src/lib/meta/api/tableApis.ts

2
packages/nocodb/src/lib/meta/api/tableApis.ts

@ -91,7 +91,7 @@ export async function tableCreate(req: Request<any, any, TableReqType>, res) {
const project = await Project.getWithInfo(req.params.projectId); const project = await Project.getWithInfo(req.params.projectId);
let base = project.bases[0]; let base = project.bases[0];
if (req.params.baseId) { if (req.params.baseId && req.params.baseId !== 'undefined') {
base = project.bases.find((b) => b.id === req.params.baseId); base = project.bases.find((b) => b.id === req.params.baseId);
} }

Loading…
Cancel
Save