Remove default user scope on GroupUser (#11531)

* Remove default user scope on GroupUser

* revert
This commit is contained in:
Tom Moor
2026-02-23 20:24:22 -05:00
committed by GitHub
parent ccde98ce82
commit 3886c179c5
2 changed files with 1 additions and 9 deletions
-8
View File
@@ -1,6 +1,5 @@
import type { InferAttributes, InferCreationAttributes } from "sequelize";
import {
DefaultScope,
BelongsTo,
ForeignKey,
Column,
@@ -14,13 +13,6 @@ import User from "./User";
import Model from "./base/Model";
import Fix from "./decorators/Fix";
@DefaultScope(() => ({
include: [
{
association: "user",
},
],
}))
@Scopes(() => ({
withGroup: {
include: [
+1 -1
View File
@@ -104,7 +104,7 @@ router.post(
groupMemberships: (
await Promise.all(
groups.map((group) =>
GroupUser.findAll({
GroupUser.scope("withUser").findAll({
where: {
groupId: group.id,
},