From 21a347068ddf8524c458865a4097fbb1670b26cf Mon Sep 17 00:00:00 2001 From: geniuus Date: Thu, 18 Jul 2024 22:45:53 +0900 Subject: [PATCH] =?UTF-8?q?Fix=20[#144]=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EC=83=9D=EC=84=B1=20=EC=8B=9C=20mset=EC=9D=B4=20?= =?UTF-8?q?=EC=97=86=EC=96=B4=EB=8F=84=20=EC=83=9D=EC=84=B1=EB=90=A0=20?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=EA=B2=8C=20null=20=ED=95=B8=EB=93=A4?= =?UTF-8?q?=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/sopt/jaksim/mset/service/MsetService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jaksim/src/main/java/org/sopt/jaksim/mset/service/MsetService.java b/jaksim/src/main/java/org/sopt/jaksim/mset/service/MsetService.java index 514a22e..c212851 100644 --- a/jaksim/src/main/java/org/sopt/jaksim/mset/service/MsetService.java +++ b/jaksim/src/main/java/org/sopt/jaksim/mset/service/MsetService.java @@ -23,9 +23,11 @@ public class MsetService { public void createByCategory(CategoryCreateRequest categoryCreateRequest, Long categoryId) { List msetList = categoryCreateRequest.msets(); - for (Mset mset : msetList) { - mset = msetRepository.save(Mset.create(mset.getName(), mset.getUrl())); - categoryMsetRepository.save(CategoryMset.create(categoryId, mset.getId())); + if (msetList != null) { + for (Mset mset : msetList) { + mset = msetRepository.save(Mset.create(mset.getName(), mset.getUrl())); + categoryMsetRepository.save(CategoryMset.create(categoryId, mset.getId())); + } } }