Skip to content
Snippets Groups Projects
Commit d45477b5 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Fix ForeignKeyField not returning object when attribute is set and new object is created

parent 04efa12e
No related branches found
No related tags found
No related merge requests found
Pipeline #136622 passed with warnings
......@@ -109,7 +109,7 @@ export default {
handleSave(data) {
let newItem =
data.data[this.gqlCreateMutation.definitions[0].name.value].item;
let newValue = this.$attrs["return-object"] ? newItem : newItem.id;
let newValue = "return-object" in this.$attrs ? newItem : newItem.id;
let modelValue =
"multiple" in this.$attrs
? Array.isArray(this.$attrs.value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment