displaying and saving number and boolean promoted attributes

This commit is contained in:
azivner
2018-08-06 15:23:22 +02:00
parent b44c523845
commit 12031d369f
3 changed files with 62 additions and 25 deletions

View File

@@ -13,10 +13,13 @@ class Attribute extends Entity {
constructor(row) {
super(row);
try {
this.value = JSON.parse(this.value);
if (this.isDefinition()) {
try {
this.value = JSON.parse(this.value);
}
catch (e) {
}
}
catch(e) {}
}
async getNote() {
@@ -24,7 +27,7 @@ class Attribute extends Entity {
}
isDefinition() {
return this.type === 'label' || this.type === 'relation';
return this.type === 'label-definition' || this.type === 'relation-definition';
}
async beforeSaving() {