From 5e3b74d0c0ed3bd7968fb0ab64a0a71e5d805b9a Mon Sep 17 00:00:00 2001 From: hhhello Date: Thu, 10 Oct 2024 09:25:36 +0900 Subject: [PATCH] Fix to update UserEntity & Widget Http --- .../graduating/graduatingserver/core/user/UserEntity.kt | 9 ++++++--- Graduating-iOS/Graduating-Widget/Info.plist | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Graduating-Server/src/main/kotlin/com/bestswlkh0310/graduating/graduatingserver/core/user/UserEntity.kt b/Graduating-Server/src/main/kotlin/com/bestswlkh0310/graduating/graduatingserver/core/user/UserEntity.kt index 163edfc..cebc6be 100644 --- a/Graduating-Server/src/main/kotlin/com/bestswlkh0310/graduating/graduatingserver/core/user/UserEntity.kt +++ b/Graduating-Server/src/main/kotlin/com/bestswlkh0310/graduating/graduatingserver/core/user/UserEntity.kt @@ -71,9 +71,12 @@ class UserEntity( if (nickname != null) { this.nickname = nickname } - if (graduatingYear != null && school?.type != null) { - val currentYear = LocalDateTime.now().year - this.graduatingYear = graduatingYear.coerceIn(currentYear + 1, currentYear + school.type.limit) + if (graduatingYear != null) { + val school = school ?: this.school + if (school?.type != null) { + val currentYear = LocalDateTime.now().year + this.graduatingYear = graduatingYear.coerceIn(currentYear + 1, currentYear + school.type.limit) + } } if (school != null) { this.school = school diff --git a/Graduating-iOS/Graduating-Widget/Info.plist b/Graduating-iOS/Graduating-Widget/Info.plist index 0f118fb..d4e598e 100644 --- a/Graduating-iOS/Graduating-Widget/Info.plist +++ b/Graduating-iOS/Graduating-Widget/Info.plist @@ -2,6 +2,11 @@ + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSExtension NSExtensionPointIdentifier