From 223abbe66f49b69953121f8b18327a6a1a7dd721 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 20 Mar 2023 14:11:02 +0100 Subject: [PATCH] Fixed user mutation --- kdb-bot/src/bot_graphql/mutations/user_mutation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kdb-bot/src/bot_graphql/mutations/user_mutation.py b/kdb-bot/src/bot_graphql/mutations/user_mutation.py index 6a852c2e..c601aab9 100644 --- a/kdb-bot/src/bot_graphql/mutations/user_mutation.py +++ b/kdb-bot/src/bot_graphql/mutations/user_mutation.py @@ -40,8 +40,8 @@ class UserMutation(QueryABC): if "levelId" in input: level = self._levels.get_level_by_id(input["levelId"]) user.xp = level.min_xp - - user.xp = input["xp"] if "xp" in input else user.xp + else: + user.xp = input["xp"] if "xp" in input else user.xp self._users.update_user(user) self._db.save_changes()