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 { ...@@ -85,12 +85,13 @@ export default {
new_params[e[0].split('_null')[0]] = '__NULL' new_params[e[0].split('_null')[0]] = '__NULL'
} else { } else {
if (e[0] in new_params && this.object_definition.attributes[e[0]].data_type.endsWith('_array')) { 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]) new_params[e[0]].push(e[1])
} else { } 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 { ...@@ -40,7 +40,7 @@ export default {
methods: {}, methods: {},
data: function () { data: function () {
return { return {
true_values: this.attribute_preset true_values: this.attribute_preset !== undefined ? this.attribute_preset : []
} }
}, },
watch: { 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