diff --git a/app/admin/photos/[photoId]/edit/page.tsx b/app/admin/photos/[photoId]/edit/page.tsx index 1cf889f0..38dda275 100644 --- a/app/admin/photos/[photoId]/edit/page.tsx +++ b/app/admin/photos/[photoId]/edit/page.tsx @@ -22,20 +22,20 @@ export default async function PhotoEditPage({ }) { const { photoId } = await params; - const photo = await getPhotoNoStore(photoId, true); - - if (!photo) { redirect(PATH_ADMIN); } - const [ + photo, uniqueTags, uniqueRecipes, uniqueFilms, ] = await Promise.all([ + getPhotoNoStore(photoId, true), getUniqueTagsCached(), getUniqueRecipesCached(), getUniqueFilmsCached(), ]); + if (!photo) { redirect(PATH_ADMIN); } + const hasAiTextGeneration = AI_TEXT_GENERATION_ENABLED; // Only generate image thumbnails when AI generation is enabled