Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fixed user delete error 500

Abhilaksh Bansal416fee0f5378
diff --git a/queries/admin/user.ts b/queries/admin/user.ts
index 412c7785d..449a3e9b7 100644
--- a/queries/admin/user.ts
+++ b/queries/admin/user.ts
@@ -197,9 +197,16 @@ export async function deleteUser(
}),
client.teamUser.deleteMany({
where: {
- teamId: {
- in: teamIds,
- },
+ OR: [
+ {
+ teamId: {
+ in: teamIds,
+ },
+ },
+ {
+ userId,
+ },
+ ],
},
}),
client.team.deleteMany({