Explorar o código

fix: User destroy hook record reference

Owen Diffey hai 2 semanas
pai
achega
5a412e4ef9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      backend/src/modules/DataModule/models/User.ts

+ 1 - 1
backend/src/modules/DataModule/models/User.ts

@@ -335,7 +335,7 @@ export const setup = async () => {
 	User.addHook("beforeDestroy", async (record: User, options) => {
 		await Session.destroy({
 			where: {
-				userId: user._id
+				userId: record._id
 			},
 			individualHooks: true,
 			transaction: options.transaction