Fixed transaction completion error on collection update
refs https://github.com/TryGhost/Arch/issues/16 - Without an extra await in the update function the passed in transaction would complete before all updates had a chance to run within this transaction.
This commit is contained in:
parent
fe4c0b18cf
commit
aaf0998129
@ -368,7 +368,7 @@ export class CollectionsService {
|
||||
return;
|
||||
}
|
||||
|
||||
this.updatePostsInCollections(postIds, collections, transaction);
|
||||
await this.updatePostsInCollections(postIds, collections, transaction);
|
||||
});
|
||||
}
|
||||
|
||||
@ -386,7 +386,7 @@ export class CollectionsService {
|
||||
return;
|
||||
}
|
||||
|
||||
this.updatePostsInCollections(postIds, collections, transaction);
|
||||
await this.updatePostsInCollections(postIds, collections, transaction);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user