mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 17:38:47 +02:00
fix validation issue + attribute not triggering change event on delete
This commit is contained in:
parent
297b536ebc
commit
f071d3f651
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user