Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 선물이 없는 나중에 보내는 선물박스 삭제 에러 수정 #238

Open
2 tasks
leeeeeyeon opened this issue Jun 30, 2024 · 0 comments
Open
2 tasks
Assignees
Labels
🔨 fix Modifying previously implemented features

Comments

@leeeeeyeon
Copy link
Collaborator

💼 작업 설명

선물이 없는 나중에 보내는 선물박스의 경우 getGift()에서 NPE가 발생하여 선물박스를 삭제하지 못하는 에러를 수정합니다.

if (giftBox.getGift().getGiftType().equals(GiftType.PHOTO)) {
    fileService.deleteFile(giftBox.getGift().getGiftUrl());
}

✅ To-do

  • 나중에 보내는 선물박스 삭제 로직에 null check 추가
  • GiftBox 엔티티의 gift 필드를 Optional로 수정

GiftBox 엔티티의 gift 필드를 Optional로 수정하는 작업은 변경되는 코드가 많으므로 우선 null check를 추가한 뒤, 추후 테스트 코드 커버리지가 높아진 후 작업하면 좋을 것 같습니다.

@leeeeeyeon leeeeeyeon added the 🔨 fix Modifying previously implemented features label Jun 30, 2024
@leeeeeyeon leeeeeyeon self-assigned this Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 fix Modifying previously implemented features
Projects
None yet
Development

No branches or pull requests

1 participant