Skip to content

Commit

Permalink
refactor : description이 null인 경우 ""가 채워지도록 변경 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-ho committed Dec 15, 2023
1 parent 905a95a commit e876db7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class GoalService(
val tag = tagService.getById(tagId)
val user = userService.getById(userId)

val goal = Goal(user, title, deadline, sticker, tag, description, emptyList())
val goal = Goal(user, title, deadline, sticker, tag, description!!, emptyList())
val savedGoal = goalRepository.save(goal)
return CreateGoalResponse(savedGoal.id!!)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ data class CreateGoalRequest(
val monthOfDeadLine: String,
val stickerId: Long,
val tagId: Long,
val description: String?,
val description: String? = "",
)
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Goal(
val tag: Tag,

@Nationalized
val description: String?,
val description: String = "",

@OneToMany(mappedBy = "goal", cascade = [CascadeType.REMOVE], fetch = FetchType.LAZY)
val tasks: List<Task>,
Expand Down

0 comments on commit e876db7

Please sign in to comment.