updating becca after sync

This commit is contained in:
zadam
2021-08-07 21:21:30 +02:00
parent 669eaa7509
commit 86a53ceebb
8 changed files with 103 additions and 42 deletions

View File

@@ -124,7 +124,7 @@ function processInverseRelations(entityName, entity, handler) {
eventService.subscribe(eventService.ENTITY_CHANGED, ({ entityName, entity }) => {
processInverseRelations(entityName, entity, (definition, note, targetNote) => {
// we need to make sure that also target's inverse attribute exists and if note, then create it
// we need to make sure that also target's inverse attribute exists and if not, then create it
// inverse attribute has to target our note as well
const hasInverseAttribute = (targetNote.getRelations(definition.inverseRelation))
.some(attr => attr.value === note.noteId);