diff --git a/core/data/src/commonMain/kotlin/org/mifos/mobile/core/data/mapper/client/ClientMapper.kt b/core/data/src/commonMain/kotlin/org/mifos/mobile/core/data/mapper/client/ClientMapper.kt index 7e0945536..848cedd8c 100644 --- a/core/data/src/commonMain/kotlin/org/mifos/mobile/core/data/mapper/client/ClientMapper.kt +++ b/core/data/src/commonMain/kotlin/org/mifos/mobile/core/data/mapper/client/ClientMapper.kt @@ -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 = diff --git a/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/ClientClassificationResponseDto.kt b/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/ClientClassificationResponseDto.kt index 1cd4ea02b..1ee89ca5a 100644 --- a/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/ClientClassificationResponseDto.kt +++ b/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/ClientClassificationResponseDto.kt @@ -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, ) diff --git a/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/ClientTypeResponseDto.kt b/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/ClientTypeResponseDto.kt index 68d76be31..08511dcb0 100644 --- a/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/ClientTypeResponseDto.kt +++ b/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/ClientTypeResponseDto.kt @@ -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, ) diff --git a/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/GenderResponseDto.kt b/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/GenderResponseDto.kt index ec80d9265..7103c9863 100644 --- a/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/GenderResponseDto.kt +++ b/core/network/src/commonMain/kotlin/org/mifos/mobile/core/network/dto/client/GenderResponseDto.kt @@ -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, )