safeguard mapper for null values on fields that need to be json-parsed

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-06-30 18:06:24 +02:00
parent 886a3d0df2
commit c151da3080
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -44,10 +44,10 @@ object LegacyUserEntityMapper {
entity.baseUrl,
entity.token,
entity.displayName,
LoganSquare.parse(entity.pushConfigurationState, PushConfigurationState::class.java),
LoganSquare.parse(entity.capabilities, Capabilities::class.java),
entity.pushConfigurationState?.let { LoganSquare.parse(it, PushConfigurationState::class.java) },
entity.capabilities?.let { LoganSquare.parse(it, Capabilities::class.java) },
entity.clientCertificate,
LoganSquare.parse(entity.externalSignalingServer, ExternalSignalingServer::class.java),
entity.externalSignalingServer?.let { LoganSquare.parse(it, ExternalSignalingServer::class.java) },
entity.current,
entity.scheduledForDeletion
)