Skip to content

Commit

Permalink
Fix to update UserEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhello0507 committed Oct 10, 2024
1 parent 3a62de5 commit 6205313
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ class UserEntity(
if (nickname != null) {
this.nickname = nickname
}
if (graduatingYear != null) {
this.school?.type?.let { type ->
val currentYear = LocalDateTime.now().year
this.graduatingYear = graduatingYear.coerceIn(currentYear + 1, currentYear + type.limit)
}
if (graduatingYear != null && school?.type != null) {
val currentYear = LocalDateTime.now().year
this.graduatingYear = graduatingYear.coerceIn(currentYear + 1, currentYear + school.type.limit)
}
if (school != null) {
this.school = school
Expand Down

0 comments on commit 6205313

Please sign in to comment.