fix(tenants): remove extra brace breaking nest build

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-27 20:25:38 +03:30
co-authored by Cursor
parent 3034c59319
commit 93a7775887
+3 -3
View File
@@ -437,7 +437,9 @@ export class TenantsService {
if (!(error instanceof Prisma.PrismaClientKnownRequestError)) { if (!(error instanceof Prisma.PrismaClientKnownRequestError)) {
return; return;
} }
if (error.code === 'P2002') { if (error.code !== 'P2002') {
return;
}
const targets = Array.isArray(error.meta?.target) const targets = Array.isArray(error.meta?.target)
? (error.meta.target as string[]) ? (error.meta.target as string[])
: []; : [];
@@ -451,6 +453,4 @@ export class TenantsService {
} }
throw new ConflictException('slug یا domain تکراری است'); throw new ConflictException('slug یا domain تکراری است');
} }
}
}
} }