LunaEvent: remove quantity when the value is invalid
This commit is contained in:
@@ -49,6 +49,8 @@ class LunaEvent: Comparable<LunaEvent> {
|
|||||||
set(value) {
|
set(value) {
|
||||||
if (value > 0)
|
if (value > 0)
|
||||||
jo.put("quantity", value)
|
jo.put("quantity", value)
|
||||||
|
else
|
||||||
|
jo.remove("quantity")
|
||||||
}
|
}
|
||||||
var notes: String
|
var notes: String
|
||||||
get(): String = jo.optString("notes")
|
get(): String = jo.optString("notes")
|
||||||
|
|||||||
Reference in New Issue
Block a user