Fix: Include imageUrl/imageUrlBack in database select query
- Previous optimization only selected colorPhotos fields - But the code checks existing.imageUrl to decide if print area should update - imageUrl/imageUrlBack were undefined, breaking the print area update logic - Now properly includes these fields in the select so the check works
This commit is contained in:
@@ -206,6 +206,8 @@ export async function updateProduct(formData: FormData) {
|
||||
select: {
|
||||
colorPhotos: true,
|
||||
colorPhotosBack: true,
|
||||
imageUrl: true,
|
||||
imageUrlBack: true,
|
||||
},
|
||||
});
|
||||
if (!existing) throw new Error('Product not found.');
|
||||
|
||||
Reference in New Issue
Block a user