diff options
author | Linnea Gräf <nea@nea.moe> | 2024-02-15 22:50:48 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-02-15 22:50:48 +0100 |
commit | 194fe5d932381190b31d832a7f128a02e119b55a (patch) | |
tree | 12b8ddfe9b4c3bd9f36b5a0e2680fc912fe0e2eb /src/main/kotlin/moe/nea | |
parent | 973f29937644bd7901783b03ef4ed60344673cef (diff) | |
download | LocalTransactionLedger-194fe5d932381190b31d832a7f128a02e119b55a.tar.gz LocalTransactionLedger-194fe5d932381190b31d832a7f128a02e119b55a.tar.bz2 LocalTransactionLedger-194fe5d932381190b31d832a7f128a02e119b55a.zip |
Remove nulls from json
Diffstat (limited to 'src/main/kotlin/moe/nea')
-rw-r--r-- | src/main/kotlin/moe/nea/ledger/LedgerLogger.kt | 4 |
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) } } } |