From 47ac7a9e4eca55113e691c59ee40e516c17f202b Mon Sep 17 00:00:00 2001 From: 101 Date: Fri, 23 Aug 2024 22:34:27 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8?= =?UTF-8?q?=20=EC=95=84=EC=9D=B4=EB=94=94=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../whopper/domain/resume/element/ProjectElement.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/whopper/domain/resume/element/ProjectElement.java b/src/main/java/com/example/whopper/domain/resume/element/ProjectElement.java index 17277235..200f15f7 100644 --- a/src/main/java/com/example/whopper/domain/resume/element/ProjectElement.java +++ b/src/main/java/com/example/whopper/domain/resume/element/ProjectElement.java @@ -5,6 +5,7 @@ import com.example.whopper.interfaces.resume.dto.ProjectElementDto; import com.example.whopper.domain.file.ImageInfo; import lombok.Getter; +import org.bson.types.ObjectId; import java.util.List; import java.util.Set; @@ -47,11 +48,14 @@ public static ProjectElement fromRequest(ProjectElementDto request) { } public record Section( + String elementId, String title, String description ) { - public static Section of(String title, String description) { - return new Section(title, description); + public Section { + if (elementId.isBlank()) { + elementId = new ObjectId().toHexString(); + } } } }