Browse Source
Merge pull request #2451 from Budibase/fix/relationship-empty
making sure relationships for autocolumns are created when uploading …
pull/2525/head
Martin McKeaveney
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
10 additions and
0 deletions
-
packages/server/src/api/controllers/table/utils.js
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
const CouchDB = require("../../../db") |
|
|
|
const linkRows = require("../../../db/linkedRows") |
|
|
|
const csvParser = require("../../../utilities/csvParser") |
|
|
|
const { |
|
|
|
getRowParams, |
|
|
|
@ -74,6 +75,15 @@ exports.handleDataImport = async (appId, user, table, dataImport) => { |
|
|
|
const processed = inputProcessing(user, table, row) |
|
|
|
table = processed.table |
|
|
|
row = processed.row |
|
|
|
// make sure link rows are up to date
|
|
|
|
row = await linkRows.updateLinks({ |
|
|
|
appId, |
|
|
|
eventType: linkRows.EventType.ROW_SAVE, |
|
|
|
row, |
|
|
|
tableId: row.tableId, |
|
|
|
table, |
|
|
|
}) |
|
|
|
|
|
|
|
for (let [fieldName, schema] of Object.entries(table.schema)) { |
|
|
|
// check whether the options need to be updated for inclusion as part of the data import
|
|
|
|
if ( |
|
|
|
|