mirror of
https://github.com/directus/directus.git
synced 2026-02-06 14:04:56 -05:00
Fixes issue #12301 - Primary key excluded on update in v-form creating a new relational item (#12480)
This commit is contained in:
@@ -319,7 +319,7 @@ export default defineComponent({
|
||||
const updatableKeys = Object.keys(updates).filter((key) => {
|
||||
const field = props.fields?.find((field) => field.field === key);
|
||||
if (!field) return false;
|
||||
return !isDisabled(field);
|
||||
return field.schema?.is_primary_key || !isDisabled(field);
|
||||
});
|
||||
|
||||
emit('update:modelValue', pick(assign({}, props.modelValue, updates), updatableKeys));
|
||||
|
||||
Reference in New Issue
Block a user