Skip to content
Snippets Groups Projects
Commit 70b34df4 authored by barillac's avatar barillac
Browse files

Vocabulary not found dirty fix (juanf)

SVN: 33800
parent 9b33a783
No related branches found
No related tags found
No related merge requests found
......@@ -388,14 +388,15 @@ var FormUtil = new function() {
var vocabulary = null;
if(isNaN(propertyType.vocabulary)) {
vocabulary = this.profile.getVocabularyById(propertyType.vocabulary.id);
if(vocabulary === null) { //This should not happen, but can save the day.
vocabulary = propertyType.vocabulary;
vocabulary.terms = propertyType.terms;
}
} else {
vocabulary = this.profile.getVocabularyById(propertyType.vocabulary);
}
if(!vocabulary && propertyType.terms) { //This should not happen, but can save the day.
vocabulary = {};
vocabulary.terms = propertyType.terms;
}
$component = this._getDropDownFieldForVocabulary(propertyType.code, vocabulary.terms, propertyType.description, propertyType.mandatory);
} else if (propertyType.dataType === "HYPERLINK") {
$component = this._getInputField("url", propertyType.code, propertyType.description, null, propertyType.mandatory);
......
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