Set xp by level only when incoming level is different from user level #281

This commit is contained in:
Sven Heidemann 2023-03-29 19:38:25 +02:00
parent ccf41bec79
commit 8025c31339

View File

@ -39,7 +39,8 @@ class UserMutation(QueryABC):
if "levelId" in input:
level = self._levels.get_level_by_id(input["levelId"])
user.xp = level.min_xp
if user.level.id != level.id:
user.xp = level.min_xp
else:
user.xp = input["xp"] if "xp" in input else user.xp