Skip to content

Commit

Permalink
Fix transaction error.
Browse files Browse the repository at this point in the history
  • Loading branch information
robgietema committed Apr 27, 2024
1 parent 3e3e6e3 commit 3abd117
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/routes/content/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,10 @@ export default [
await req.document.fetchRelated('_catalog', trx);

if (req.document._children) {
await Promise.all(
req.document._children.map(
async (child) =>
await Promise.all(
child.fetchRelated('_catalog', trx),
child.fetchRelationLists(trx),
),
),
);
await mapAsync(req.document._children, async (child) => {
await child.fetchRelated('_catalog', trx);
await child.fetchRelationLists(trx);
});
}
}
return {
Expand Down

0 comments on commit 3abd117

Please sign in to comment.