Skip to content

Commit

Permalink
WEBUI-232: set vocabulary parent to root when none is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
richardsd committed Feb 11, 2021
1 parent 2c63176 commit d525321
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -167,7 +167,10 @@ <h2>[[i18n('vocabularyManagement.selectParent')]]</h2>
observers: ['_inputChanged(entry, entries)'],

_entryChanged() {
this.entry.properties.obsolete = this.entry.properties.obsolete ? 1 : 0;
const { obsolete, parent } = this.entry.properties;
this.entry.properties.obsolete = obsolete ? 1 : 0;
// if the entry doesn't have a parent, then we set it has the root
this.entry.properties.parent = parent == null ? this._root.properties.id : parent;
},

_isObsolete(obsolete) {
Expand Down

0 comments on commit d525321

Please sign in to comment.