James McCool
commited on
Commit
·
149c996
1
Parent(s):
f65755c
Initialize sport selection in session state for contest analysis tab in app.py
Browse files- Added a check to ensure 'sport_select' is initialized in session state only if it is not already set, improving the robustness of the contest analysis functionality.
- This change enhances user experience by maintaining consistent state management across different tabs.
app.py
CHANGED
|
@@ -467,8 +467,8 @@ if selected_tab == 'Data Load':
|
|
| 467 |
st.session_state['unique_players'] = [p for p in st.session_state['unique_players'] if p != 'nan']
|
| 468 |
|
| 469 |
if selected_tab == 'Contest Analysis':
|
| 470 |
-
|
| 471 |
-
|
| 472 |
|
| 473 |
if 'display_contest_info' in st.session_state:
|
| 474 |
with st.expander("Info and filters"):
|
|
|
|
| 467 |
st.session_state['unique_players'] = [p for p in st.session_state['unique_players'] if p != 'nan']
|
| 468 |
|
| 469 |
if selected_tab == 'Contest Analysis':
|
| 470 |
+
if 'sport_select' not in st.session_state:
|
| 471 |
+
st.session_state['sport_select'] = st.session_state['sport_init']
|
| 472 |
|
| 473 |
if 'display_contest_info' in st.session_state:
|
| 474 |
with st.expander("Info and filters"):
|