diff --git a/src/entities/attribute.js b/src/entities/attribute.js index c478ffaf8..4fbbdd396 100644 --- a/src/entities/attribute.js +++ b/src/entities/attribute.js @@ -8,7 +8,7 @@ const sql = require('../services/sql'); class Attribute extends Entity { static get tableName() { return "attributes"; } static get primaryKeyName() { return "attributeId"; } - static get hashedProperties() { return ["attributeId", "noteId", "type", "name", "value", "isInheritable", "dateCreated"]; } + static get hashedProperties() { return ["attributeId", "noteId", "type", "name", "value", "isInheritable", "isDeleted", "dateCreated"]; } constructor(row) { super(row); diff --git a/src/public/javascripts/dialogs/attributes.js b/src/public/javascripts/dialogs/attributes.js index d8a8fad08..fa192ff4d 100644 --- a/src/public/javascripts/dialogs/attributes.js +++ b/src/public/javascripts/dialogs/attributes.js @@ -227,7 +227,7 @@ function AttributesModel() { this.isEmptyName = function(index) { const cur = self.ownedAttributes()[index](); - return cur.name.trim() === "" && (cur.attributeId !== "" || cur.labelValue !== "" || cur.relationValue); + return cur.name.trim() === "" && !cur.isDeleted && (cur.attributeId !== "" || cur.labelValue !== "" || cur.relationValue); }; this.getTargetAttribute = function(target) {