Replace maps for foreach

This commit is contained in:
adrinr 2023-02-21 15:57:56 +00:00
parent e0b3976ee4
commit be81767a46
1 changed files with 2 additions and 2 deletions

View File

@ -293,7 +293,7 @@ export class ExternalRequest {
// we're not inserting a doc, will be a bunch of update calls
const otherKey: string = field.throughFrom || linkTablePrimary
const thisKey: string = field.throughTo || tablePrimary
row[key].map((relationship: any) => {
row[key].forEach((relationship: any) => {
manyRelationships.push({
tableId: field.through || field.tableId,
isUpdate: false,
@ -309,7 +309,7 @@ export class ExternalRequest {
const thisKey: string = "id"
// @ts-ignore
const otherKey: string = field.fieldName
row[key].map((relationship: any) => {
row[key].forEach((relationship: any) => {
manyRelationships.push({
tableId: field.tableId,
isUpdate: true,