File tree 1 file changed +11
-0
lines changed
packages/core/core/src/services/document-service
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,11 @@ export const createContentTypeRepository: RepositoryFactoryMethod = (
391
391
oldVersions : oldDrafts ,
392
392
} ) ;
393
393
394
+ const bidirectionalRelationsToSync = await bidirectionalRelations . load ( uid , {
395
+ newVersions : versionsToDraft ,
396
+ oldVersions : oldDrafts ,
397
+ } ) ;
398
+
394
399
// Delete old drafts
395
400
await async . map ( oldDrafts , ( entry : any ) => entries . delete ( entry . id ) ) ;
396
401
@@ -406,6 +411,12 @@ export const createContentTypeRepository: RepositoryFactoryMethod = (
406
411
relationsToSync
407
412
) ;
408
413
414
+ await bidirectionalRelations . sync (
415
+ [ ...oldDrafts , ...versionsToDraft ] ,
416
+ draftEntries ,
417
+ bidirectionalRelationsToSync
418
+ ) ;
419
+
409
420
draftEntries . forEach ( emitEvent ( 'entry.draft-discard' ) ) ;
410
421
return { documentId, entries : draftEntries } ;
411
422
}
You can’t perform that action at this time.
0 commit comments