Fix saving error with custom permissions in O2M fields (#13998)

* fix 13765: saving error with rbac role on relation collections

* simplify the implementation
This commit is contained in:
younky-yang
2022-06-29 03:43:51 +08:00
committed by GitHub
parent 23de088037
commit 4bf69cb318

View File

@@ -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 = '+';