Fixed user mutation

This commit is contained in:
Sven Heidemann 2023-03-20 14:11:02 +01:00
parent 4c5a8baed5
commit 223abbe66f

View File

@ -40,8 +40,8 @@ class UserMutation(QueryABC):
if "levelId" in input: if "levelId" in input:
level = self._levels.get_level_by_id(input["levelId"]) level = self._levels.get_level_by_id(input["levelId"])
user.xp = level.min_xp user.xp = level.min_xp
else:
user.xp = input["xp"] if "xp" in input else user.xp user.xp = input["xp"] if "xp" in input else user.xp
self._users.update_user(user) self._users.update_user(user)
self._db.save_changes() self._db.save_changes()