Fix image deletion logic

This commit is contained in:
gpt-engineer-app[bot]
2025-09-29 02:27:53 +00:00
parent fb29398eb4
commit e6c74aa6c2

View File

@@ -417,9 +417,12 @@ export const ModerationQueue = forwardRef<ModerationQueueRef>((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);