From 8904d521cd27d47708b5f35bc8ed0420077e0f32 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 2 Apr 2022 11:57:35 -0400 Subject: [PATCH] Handle `deck["xp_spent"]` being None --- ahtcg_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ahtcg_bot.py b/ahtcg_bot.py index 9619db4..fb044ea 100755 --- a/ahtcg_bot.py +++ b/ahtcg_bot.py @@ -98,7 +98,7 @@ class ArkhamDBUpdater(commands.Bot): issues = [] if deck["xp"] is not None: - unspent_xp = deck["xp"] - deck["xp_spent"] + unspent_xp = deck["xp"] - (deck["xp_spent"] or 0) if unspent_xp > 0: issues.append(f"{unspent_xp} unspent XP") if deck["problem"] is not None: