Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsNyl committed Sep 25, 2024
1 parent 9236863 commit 3b9004e
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions app/common/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,19 @@ def get_user_class_number(user_class: NativeUserClass) -> int:
return int(_class.split(".")[0])


def get_user_class_name(user_class: int) -> NativeUserClass:
match user_class:
case 1:
return NativeUserClass.FIRST
case 2:
return NativeUserClass.SECOND
case 3:
return NativeUserClass.THIRD
case 4:
return NativeUserClass.FOURTH
case 5:
return NativeUserClass.FIFTH
case 6:
return NativeUserClass.ALUMNI
case _:
raise ValueError("Invalid user class")
def get_user_class_name(user_class: int):
if user_class == 1:
return NativeUserClass.FIRST
elif user_class == 2:
return NativeUserClass.SECOND
elif user_class == 3:
return NativeUserClass.THIRD
elif user_class == 4:
return NativeUserClass.FOURTH
elif user_class == 5:
return NativeUserClass.FIFTH
else:
return NativeUserClass.ALUMNI


# This can't be removed because it is used in the migrations. It is not used in the code
Expand Down

0 comments on commit 3b9004e

Please sign in to comment.