Fix Prisma query by excluding problematic designImageDimensions field

Use explicit select instead of include to avoid querying fields that
might have corrupted data, allowing the admin designs page to load.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-18 19:10:19 +01:00
co-authored by Claude Haiku 4.5
parent ae09d22004
commit ca11baf1ae
+7 -1
View File
@@ -4,7 +4,13 @@ import AdminNav from '@/components/AdminNav';
export default async function DesignsPage() { export default async function DesignsPage() {
const designs = await prisma.designApproval.findMany({ const designs = await prisma.designApproval.findMany({
include: { select: {
id: true,
customerName: true,
customerEmail: true,
designPreviewUrl: true,
status: true,
createdAt: true,
product: true, product: true,
messages: { orderBy: { createdAt: 'desc' }, take: 1 }, messages: { orderBy: { createdAt: 'desc' }, take: 1 },
}, },