mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
fix: Events lacking teamId published for sourced memberships (#8295)
This commit is contained in:
@@ -158,7 +158,7 @@ class GroupMembership extends ParanoidModel<
|
||||
permission: membership.permission,
|
||||
createdById: membership.createdById,
|
||||
},
|
||||
{ transaction }
|
||||
{ transaction, hooks: false }
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -144,12 +144,12 @@ class UserMembership extends IdModel<
|
||||
options: SaveOptions
|
||||
) {
|
||||
const { transaction } = options;
|
||||
const groupMemberships = await this.findAll({
|
||||
const userMemberships = await this.findAll({
|
||||
where,
|
||||
transaction,
|
||||
});
|
||||
await Promise.all(
|
||||
groupMemberships.map((membership) =>
|
||||
userMemberships.map((membership) =>
|
||||
this.create(
|
||||
{
|
||||
documentId: document.id,
|
||||
@@ -158,7 +158,7 @@ class UserMembership extends IdModel<
|
||||
permission: membership.permission,
|
||||
createdById: membership.createdById,
|
||||
},
|
||||
{ transaction }
|
||||
{ transaction, hooks: false }
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user