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:
co-authored by
Claude Haiku 4.5
parent
ae09d22004
commit
ca11baf1ae
@@ -4,7 +4,13 @@ import AdminNav from '@/components/AdminNav';
|
||||
|
||||
export default async function DesignsPage() {
|
||||
const designs = await prisma.designApproval.findMany({
|
||||
include: {
|
||||
select: {
|
||||
id: true,
|
||||
customerName: true,
|
||||
customerEmail: true,
|
||||
designPreviewUrl: true,
|
||||
status: true,
|
||||
createdAt: true,
|
||||
product: true,
|
||||
messages: { orderBy: { createdAt: 'desc' }, take: 1 },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user