Fixed issue that would cause the wrong field to be extracted when using "detailed" updates in o2m with non-"id" primary keys (#6841)

Fixes #6817
This commit is contained in:
Rijk van Zanten
2021-07-15 23:40:04 +02:00
committed by GitHub
parent 99184a2fd7
commit f360a2d445
2 changed files with 1 additions and 9 deletions

View File

@@ -543,7 +543,7 @@ export class PayloadService {
}
if (alterations.update) {
const primaryKeyField = this.schema.collections[this.collection].primary;
const primaryKeyField = this.schema.collections[relation.collection].primary;
for (const item of alterations.update) {
await itemsService.updateOne(