diff --git a/src/main/kotlin/com/msg/gauth/domain/client/service/DelegateOwnerService.kt b/src/main/kotlin/com/msg/gauth/domain/client/service/DelegateOwnerService.kt index 706e9a14..66737792 100644 --- a/src/main/kotlin/com/msg/gauth/domain/client/service/DelegateOwnerService.kt +++ b/src/main/kotlin/com/msg/gauth/domain/client/service/DelegateOwnerService.kt @@ -35,7 +35,7 @@ class DelegateOwnerService( val delegateUser = userRepository.findByIdOrNull(delegateUserId) ?: throw UserNotFoundException() - if (delegateUser.userRole.any { it.userRoleType != UserRoleType.ROLE_STUDENT }) + if (!delegateUser.userRole.any { it.userRoleType == UserRoleType.ROLE_STUDENT }) throw InvalidDelegateUserException() val updateClient = Client(