Fix: Handle missing fields in client profile API response (#3097)

This commit is contained in:
Aryan Baglane 2026-02-03 22:34:09 +05:30 committed by GitHub
parent 36206fa808
commit 7516d55272
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 12 deletions

View File

@ -79,24 +79,24 @@ fun ClientClassificationResponseDto.toModel(): ClientClassification =
ClientClassification(
id = id,
name = name,
active = active,
mandatory = mandatory,
active = active ?: false,
mandatory = mandatory ?: false,
)
fun ClientTypeResponseDto.toModel(): ClientType =
ClientType(
id = id,
name = name,
active = active,
mandatory = mandatory,
active = active ?: false,
mandatory = mandatory ?: false,
)
fun GenderResponseDto.toModel(): Gender =
Gender(
id = id,
name = name,
active = active,
mandatory = mandatory,
active = active ?: false,
mandatory = mandatory ?: false,
)
fun GroupResponseDto.toModel(): Group =

View File

@ -15,6 +15,6 @@ import kotlinx.serialization.Serializable
data class ClientClassificationResponseDto(
val id: Int,
val name: String? = null,
val active: Boolean,
val mandatory: Boolean,
val active: Boolean? = null,
val mandatory: Boolean? = null,
)

View File

@ -15,6 +15,6 @@ import kotlinx.serialization.Serializable
data class ClientTypeResponseDto(
val id: Int,
val name: String? = null,
val active: Boolean,
val mandatory: Boolean,
val active: Boolean? = null,
val mandatory: Boolean? = null,
)

View File

@ -15,6 +15,6 @@ import kotlinx.serialization.Serializable
data class GenderResponseDto(
val id: Int,
val name: String? = null,
val active: Boolean,
val mandatory: Boolean,
val active: Boolean? = null,
val mandatory: Boolean? = null,
)