Added check with -xp to get_level #357

Merged
edraft merged 3 commits from fix_get_level_with_negative_xp into support 2023-09-10 22:23:34 +02:00
Owner
No description provided.
edraft added 1 commit 2023-09-10 11:07:57 +02:00
edraft added 1 commit 2023-09-10 11:14:15 +02:00
Ebola-Chan requested changes 2023-09-10 14:45:17 +02:00
@ -41,2 +41,4 @@
def get_level(self, user: User) -> Level:
levels_by_server = self._levels.get_levels_by_server_id(user.server.id)
if user.xp < 0:
levels_by_server.order_by(lambda l: l.min_xp).first()
Contributor

Ich meine hier fehlt ein Return.

return levels_by_server.order_by(lambda l: l.min_xp).first()
Ich meine hier fehlt ein Return. ```python return levels_by_server.order_by(lambda l: l.min_xp).first() ````
Author
Owner

Dem ist auch so

Dem ist auch so
edraft added 1 commit 2023-09-10 18:21:34 +02:00
Ebola-Chan approved these changes 2023-09-10 19:30:15 +02:00
edraft merged commit dca939f025 into support 2023-09-10 22:23:34 +02:00
edraft deleted branch fix_get_level_with_negative_xp 2023-09-10 22:23:34 +02:00
Sign in to join this conversation.
No description provided.