console: fix for manually added relationships

GitOrigin-RevId: de609849f14882c4c97a4676e73f396ce7c9d767
This commit is contained in:
Vijay Prasanna 2021-04-06 01:15:26 +05:30 committed by hasura-bot
parent 8274fee00f
commit a93135d1b1

View File

@ -328,7 +328,7 @@ export const findAllFromRel = (curTable: Table, rel: Relationship) => {
if (fkc) {
rTable = fkc.ref_table;
rSchema = fkc.ref_table_table_schema;
rcol = [fkc.column_mapping[(lcol as any) as string]];
rcol = [fkc ? fkc.column_mapping[(lcol as any) as string] : ''];
}
}
@ -344,7 +344,7 @@ export const findAllFromRel = (curTable: Table, rel: Relationship) => {
rSchema = 'public';
}
const rfkc = findOppFKConstraint(curTable, rcol);
lcol = [rfkc!.column_mapping[(rcol as any) as string]];
lcol = [rfkc ? rfkc!.column_mapping[(rcol as any) as string] : ''];
}
}
return {