Fix 2-way position string bug

This commit is contained in:
Cal Corum 2023-10-27 21:00:09 -05:00
parent 7a5dd257ef
commit b03cf19bf7

View File

@ -1194,15 +1194,15 @@ def get_pos_data(all_pos, is_pitcher: bool = False) -> dict:
arm_added = False arm_added = False
first = True first = True
for x in all_pos: for x in all_pos:
if not first:
final += ', '
first = False
if is_pitcher: if is_pitcher:
if x.position == 'P': if x.position == 'P':
final += f'p-{x.range}e{x.error}' final += f'p-{x.range}e{x.error}'
break
else: else:
if x.position != 'P': if x.position != 'P':
if not first:
final += ', '
first = False
final += x.position.lower() final += x.position.lower()
if x.position != 'DH': if x.position != 'DH':
final += f'-{x.range}' final += f'-{x.range}'