mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix creating inverse relations
This commit is contained in:
parent
79b8d91025
commit
8a455e83f0
@ -644,12 +644,9 @@ class NoteShort {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear note's attributes cache to force fresh reload for next attribute request.
|
* @deprecated NOOP
|
||||||
* Cache is note instance scoped.
|
|
||||||
*/
|
*/
|
||||||
invalidateAttributeCache() {
|
invalidateAttributeCache() {}
|
||||||
this.__attributeCache = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get relations which target this note
|
* Get relations which target this note
|
||||||
|
@ -137,8 +137,6 @@ eventService.subscribe(eventService.ENTITY_CHANGED, ({ entityName, entity }) =>
|
|||||||
value: note.noteId,
|
value: note.noteId,
|
||||||
isInheritable: entity.isInheritable
|
isInheritable: entity.isInheritable
|
||||||
}).save();
|
}).save();
|
||||||
|
|
||||||
targetNote.invalidateAttributeCache();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -150,9 +148,6 @@ eventService.subscribe(eventService.ENTITY_DELETED, ({ entityName, entity }) =>
|
|||||||
|
|
||||||
for (const relation of relations) {
|
for (const relation of relations) {
|
||||||
if (relation.value === note.noteId) {
|
if (relation.value === note.noteId) {
|
||||||
note.invalidateAttributeCache();
|
|
||||||
targetNote.invalidateAttributeCache();
|
|
||||||
|
|
||||||
relation.markAsDeleted();
|
relation.markAsDeleted();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user