mirror of
https://github.com/directus/directus.git
synced 2026-02-01 20:25:02 -05:00
@@ -325,6 +325,8 @@ export class PayloadService {
|
||||
const relatedRecord: Partial<Item> = payload[relation.many_field];
|
||||
const hasPrimaryKey = relatedRecord.hasOwnProperty(relation.one_primary);
|
||||
|
||||
if (['string', 'number'].includes(typeof relatedRecord)) continue;
|
||||
|
||||
let relatedPrimaryKey: PrimaryKey = relatedRecord[relation.one_primary];
|
||||
const exists = hasPrimaryKey && !!(await itemsService.readByKey(relatedPrimaryKey));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user