From e6c74aa6c23f2f39ccc17578496a0a357b5cb475 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 02:27:53 +0000 Subject: [PATCH] Fix image deletion logic --- src/components/moderation/ModerationQueue.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/moderation/ModerationQueue.tsx b/src/components/moderation/ModerationQueue.tsx index 31913e25..4f3b3407 100644 --- a/src/components/moderation/ModerationQueue.tsx +++ b/src/components/moderation/ModerationQueue.tsx @@ -417,9 +417,12 @@ export const ModerationQueue = forwardRef((props, ref) => { const validImageIds: string[] = []; const skippedPhotos: string[] = []; - if (item.content?.photos && Array.isArray(item.content.photos)) { - console.log('Processing photos from content:', item.content.photos); - for (const photo of item.content.photos) { + // Try both nested paths for photos array (handle different content structures) + const photosArray = item.content?.content?.photos || item.content?.photos; + + if (photosArray && Array.isArray(photosArray)) { + console.log('Processing photos from content:', photosArray); + for (const photo of photosArray) { console.log('Processing photo object:', photo); console.log('Photo keys:', Object.keys(photo)); console.log('photo.imageId:', photo.imageId, 'type:', typeof photo.imageId);