Check manyRelationships length (#11907)
This commit is contained in:
parent
60c1922a37
commit
6c9ff55f8a
|
@ -818,7 +818,10 @@ export class ExternalRequest {
|
|||
// can't really use response right now
|
||||
const response = await getDatasourceAndQuery(json)
|
||||
// handle many to many relationships now if we know the ID (could be auto increment)
|
||||
if (operation !== Operation.READ && processed.manyRelationships) {
|
||||
if (
|
||||
operation !== Operation.READ &&
|
||||
processed.manyRelationships?.length > 0
|
||||
) {
|
||||
await this.handleManyRelationships(
|
||||
table._id || "",
|
||||
response[0],
|
||||
|
|
Loading…
Reference in New Issue