more whitepace handling
This commit is contained in:
parent
e22a1b3345
commit
996d35ec06
|
@ -88,11 +88,13 @@ class Draft:
|
||||||
if self._active_participant.handle != handle:
|
if self._active_participant.handle != handle:
|
||||||
raise ValueError('Invalid drafter')
|
raise ValueError('Invalid drafter')
|
||||||
|
|
||||||
|
player_name = player_name.strip()
|
||||||
|
|
||||||
player = self._players.get(player_name)
|
player = self._players.get(player_name)
|
||||||
if not player:
|
if not player:
|
||||||
# might be some whitespace shenanigans
|
# might be some whitespace shenanigans
|
||||||
for name, stats in self._players.items():
|
for name, stats in self._players.items():
|
||||||
if name.replace('\xa0', ' ') == player_name:
|
if name.replace('\xa0', ' ').strip() == player_name:
|
||||||
player = stats
|
player = stats
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user