From 72b944a25d9d359aee143c03c7275021a310f18d Mon Sep 17 00:00:00 2001 From: Muyung Date: Sun, 24 Sep 2023 20:55:54 +0800 Subject: [PATCH] If can not find applicant, return User(null, null). --- cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/route/Vm.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/route/Vm.kt b/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/route/Vm.kt index 9594a68..5663b2f 100644 --- a/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/route/Vm.kt +++ b/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/route/Vm.kt @@ -209,7 +209,7 @@ internal fun ApplicationCall.convertVmApplyResponse(vmApply: VmApply) = CreateVm namePrefix = vmApply.namePrefix, studentId = convertSimpleUser(vmApply.studentId), teacherId = convertSimpleUser(vmApply.teacherId), - applicant = convertSimpleUser(vmApply.applicant)!!, + applicant = convertSimpleUser(vmApply.applicant) ?: SimpleUser("null", "null"), experimentId = vmApply.experimentId, studentIdList = vmApply.studentIdList, cpu = vmApply.cpu,