aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/ledger
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-02-15 22:50:48 +0100
committerLinnea Gräf <nea@nea.moe>2024-02-15 22:50:48 +0100
commit194fe5d932381190b31d832a7f128a02e119b55a (patch)
tree12b8ddfe9b4c3bd9f36b5a0e2680fc912fe0e2eb /src/main/kotlin/moe/nea/ledger
parent973f29937644bd7901783b03ef4ed60344673cef (diff)
downloadLocalTransactionLedger-194fe5d932381190b31d832a7f128a02e119b55a.tar.gz
LocalTransactionLedger-194fe5d932381190b31d832a7f128a02e119b55a.tar.bz2
LocalTransactionLedger-194fe5d932381190b31d832a7f128a02e119b55a.zip
Remove nulls from json
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger')
-rw-r--r--src/main/kotlin/moe/nea/ledger/LedgerLogger.kt4
1 files 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)
}
}
}