Skip to content

Commit

Permalink
Refactor some lol name validation code.
Browse files Browse the repository at this point in the history
  • Loading branch information
KwikKill committed Feb 27, 2024
1 parent fc6c62b commit 49022d3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions insalan/tournament/models/name_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ def is_valid(name: str):
This method is used to validate the name of a LoL player
"""
# Validate the format of the name
if not "#" in name:
return False
if name.count("#") > 1:
if name.count("#") != 1:
return False
gamename, tagline = name.split("#")

Expand Down

0 comments on commit 49022d3

Please sign in to comment.