From 4bf69cb31834da70a5624a1a17ed4e54181b4cfd Mon Sep 17 00:00:00 2001 From: younky-yang Date: Wed, 29 Jun 2022 03:43:51 +0800 Subject: [PATCH] Fix saving error with custom permissions in O2M fields (#13998) * fix 13765: saving error with rbac role on relation collections * simplify the implementation --- app/src/interfaces/list-o2m/list-o2m.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/interfaces/list-o2m/list-o2m.vue b/app/src/interfaces/list-o2m/list-o2m.vue index 4966e4e7b2..ee52882f9d 100644 --- a/app/src/interfaces/list-o2m/list-o2m.vue +++ b/app/src/interfaces/list-o2m/list-o2m.vue @@ -210,7 +210,7 @@ function editItem(item: DisplayItem) { const pkField = relationInfo.value.relatedPrimaryKeyField.field; newItem = false; - editsAtStart.value = item; + editsAtStart.value = { [pkField]: item[pkField] }; if (item?.$type === 'created' && !isItemSelected(item)) { currentlyEditing.value = '+';