mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	fix validation issue + attribute not triggering change event on delete
This commit is contained in:
		| @@ -8,7 +8,7 @@ const sql = require('../services/sql'); | |||||||
| class Attribute extends Entity { | class Attribute extends Entity { | ||||||
|     static get tableName() { return "attributes"; } |     static get tableName() { return "attributes"; } | ||||||
|     static get primaryKeyName() { return "attributeId"; } |     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) { |     constructor(row) { | ||||||
|         super(row); |         super(row); | ||||||
|   | |||||||
| @@ -227,7 +227,7 @@ function AttributesModel() { | |||||||
|     this.isEmptyName = function(index) { |     this.isEmptyName = function(index) { | ||||||
|         const cur = self.ownedAttributes()[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) { |     this.getTargetAttribute = function(target) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user