diff --git a/src/main/java/in/koreatech/koin/domain/shop/MenuImage.java b/src/main/java/in/koreatech/koin/domain/shop/MenuImage.java index 05a998952..d99a29cd6 100644 --- a/src/main/java/in/koreatech/koin/domain/shop/MenuImage.java +++ b/src/main/java/in/koreatech/koin/domain/shop/MenuImage.java @@ -45,6 +45,7 @@ public void setMenu(Menu menu) { if (menu.equals(this.menu)) { return; } + if (this.menu != null) { this.menu.getMenuImages().remove(this); } diff --git a/src/main/java/in/koreatech/koin/domain/shop/MenuOption.java b/src/main/java/in/koreatech/koin/domain/shop/MenuOption.java index c1f3de7a3..0de98097e 100644 --- a/src/main/java/in/koreatech/koin/domain/shop/MenuOption.java +++ b/src/main/java/in/koreatech/koin/domain/shop/MenuOption.java @@ -50,6 +50,7 @@ public void setMenu(Menu menu) { if (menu.equals(this.menu)) { return; } + if (this.menu != null) { this.menu.getMenuOptions().remove(this); }