Skip to content
Snippets Groups Projects
Verified Commit 085c789b authored by Janis Streib's avatar Janis Streib :owl:
Browse files

FIX: broken array handling in dbeditor (fixes #775)

parent 76f8ad43
No related branches found
No related tags found
No related merge requests found
Pipeline #391455 passed with warnings
......@@ -85,12 +85,13 @@ export default {
new_params[e[0].split('_null')[0]] = '__NULL'
} else {
if (e[0] in new_params && this.object_definition.attributes[e[0]].data_type.endsWith('_array')) {
if (!Array.isArray(new_params[e[0]])) {
new_params[e[0]] = [new_params[e[0]]]
}
new_params[e[0]].push(e[1])
} else {
new_params[e[0]] = e[1]
if (this.object_definition.attributes[e[0]].data_type.endsWith('_array')) {
new_params[e[0]] = [e[1]]
} else {
new_params[e[0]] = e[1]
}
}
}
}
......
......@@ -40,7 +40,7 @@ export default {
methods: {},
data: function () {
return {
true_values: this.attribute_preset
true_values: this.attribute_preset !== undefined ? this.attribute_preset : []
}
},
watch: {
......
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