fix creating inverse relations

This commit is contained in:
zadam 2021-10-27 22:28:33 +02:00
parent 79b8d91025
commit 8a455e83f0
2 changed files with 2 additions and 10 deletions

View file

@ -644,12 +644,9 @@ class NoteShort {
}
/**
* Clear note's attributes cache to force fresh reload for next attribute request.
* Cache is note instance scoped.
* @deprecated NOOP
*/
invalidateAttributeCache() {
this.__attributeCache = null;
}
invalidateAttributeCache() {}
/**
* Get relations which target this note

View file

@ -137,8 +137,6 @@ eventService.subscribe(eventService.ENTITY_CHANGED, ({ entityName, entity }) =>
value: note.noteId,
isInheritable: entity.isInheritable
}).save();
targetNote.invalidateAttributeCache();
}
});
});
@ -150,9 +148,6 @@ eventService.subscribe(eventService.ENTITY_DELETED, ({ entityName, entity }) =>
for (const relation of relations) {
if (relation.value === note.noteId) {
note.invalidateAttributeCache();
targetNote.invalidateAttributeCache();
relation.markAsDeleted();
}
}