Fixing an issue detected by tests.
This commit is contained in:
parent
75cee3c4fd
commit
b597bd3dbe
|
@ -18,12 +18,15 @@ import { builderSocket } from "../../../websockets"
|
|||
import { inputProcessing } from "../../../utilities/rowProcessor"
|
||||
|
||||
function getDatasourceId(table: Table) {
|
||||
if (!table || !table._id) {
|
||||
throw new Error("No table/table ID supplied")
|
||||
if (!table) {
|
||||
throw new Error("No table supplied")
|
||||
}
|
||||
if (table.sourceId) {
|
||||
return table.sourceId
|
||||
}
|
||||
if (!table._id) {
|
||||
throw new Error("No table ID supplied")
|
||||
}
|
||||
return breakExternalTableId(table._id).datasourceId
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue