diff --git a/app/posts/repository.py b/app/posts/repository.py index 12668cb..87c8ce9 100644 --- a/app/posts/repository.py +++ b/app/posts/repository.py @@ -133,9 +133,13 @@ async def update_post( post.description = description post.category = category post.tags = tags - post.images = images + # 새 이미지들을 세션에 추가 + self.session.add_all(images) await self.session.flush() + + # images 관계를 다시 로드 + await self.session.refresh(post, ["images"]) return post async def save_post_images(