Jon Solow
commited on
Commit
Β·
c1ae968
1
Parent(s):
2d08297
Fix logic for showing the correct player when attempting to switch
Browse files
src/pages/10_Set_Your_Lineup.py
CHANGED
@@ -142,9 +142,16 @@ def position_cell(
|
|
142 |
if selected_player_from_box.gsis_id and selected_player_from_box.gsis_id != selected_id:
|
143 |
if selected_player_from_box.is_locked():
|
144 |
st.warning("Sorry player's game has already started", icon="π¨")
|
|
|
|
|
|
|
|
|
|
|
145 |
return
|
146 |
else:
|
147 |
update_and_save_selection(pos_label, selected_player_from_box.gsis_id, existing_selection_map),
|
|
|
|
|
148 |
display_player(selected_player)
|
149 |
|
150 |
|
|
|
142 |
if selected_player_from_box.gsis_id and selected_player_from_box.gsis_id != selected_id:
|
143 |
if selected_player_from_box.is_locked():
|
144 |
st.warning("Sorry player's game has already started", icon="π¨")
|
145 |
+
display_player(selected_player)
|
146 |
+
return
|
147 |
+
elif selected_player_from_box.gsis_id in existing_selection_map.values():
|
148 |
+
st.warning("Player already in lineup. Please choose another.", icon="π¨")
|
149 |
+
display_player(selected_player)
|
150 |
return
|
151 |
else:
|
152 |
update_and_save_selection(pos_label, selected_player_from_box.gsis_id, existing_selection_map),
|
153 |
+
display_player(selected_player_from_box)
|
154 |
+
else:
|
155 |
display_player(selected_player)
|
156 |
|
157 |
|