From 9960e093d1177ea979325310cbc10a5002d7846f Mon Sep 17 00:00:00 2001 From: Invidam Date: Sat, 23 Dec 2023 22:45:52 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=98=88=EC=99=B8=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=9C=84=ED=95=9C=20=EB=A1=9C=EC=A7=81=20=EC=A4=84?= =?UTF-8?q?=EB=B0=94=EA=BF=88=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/in/koreatech/koin/domain/shop/MenuImage.java | 1 + src/main/java/in/koreatech/koin/domain/shop/MenuOption.java | 1 + 2 files changed, 2 insertions(+) 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); }