File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
sms-core/src/main/kotlin/team/msg/sms/domain/authentication/usecase Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import team.msg.sms.domain.authentication.service.*
11
11
import team.msg.sms.domain.file.dto.res.FileResponseData
12
12
import team.msg.sms.domain.file.service.FileService
13
13
import java.util.*
14
- import kotlin.math.max
15
14
16
15
@UseCase
17
16
class QueryAuthenticationFormUseCase (
@@ -25,7 +24,15 @@ class QueryAuthenticationFormUseCase(
25
24
) {
26
25
@Transactional(readOnly = true )
27
26
fun execute (): QueryAuthenticationFormResponseData {
28
- val authenticationFormId = authenticationFormService.getActiveAuthenticationFormId()
27
+ val authenticationFormId = runCatching {
28
+ authenticationFormService.getActiveAuthenticationFormId()
29
+ }.getOrNull()
30
+
31
+ authenticationFormId ? : return QueryAuthenticationFormResponseData (
32
+ files = emptyList(),
33
+ content = emptyList()
34
+ )
35
+
29
36
val files = fetchFiles(authenticationFormId)
30
37
val groups = fetchAuthenticationGroups(authenticationFormId)
31
38
val authenticationSections = fetchAuthenticationSections(groups)
You canโt perform that action at this time.
0 commit comments