From 194fe5d932381190b31d832a7f128a02e119b55a Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Thu, 15 Feb 2024 22:50:48 +0100 Subject: Remove nulls from json --- src/main/kotlin/moe/nea/ledger/LedgerLogger.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt b/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt index 7690d25..5265f2a 100644 --- a/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt +++ b/src/main/kotlin/moe/nea/ledger/LedgerLogger.kt @@ -78,8 +78,8 @@ data class LedgerEntry( addProperty("transactionType", transactionType) addProperty("timestamp", timestamp.toEpochMilli().toString()) addProperty("totalTransactionValue", totalTransactionCoins) - addProperty("itemId", itemId) - addProperty("itemAmount", itemAmount) + addProperty("itemId", itemId ?: "") + addProperty("itemAmount", itemAmount ?: 0) } } } -- cgit