James McCool
commited on
Commit
·
bca2538
1
Parent(s):
e22fb4e
Update session state handling in app.py to improve contest data management
Browse files- Changed the condition for deleting the contest entry from session state to check 'display_contest_info' instead of 'Contest', ensuring accurate handling of contest data.
- This update enhances data integrity by preventing potential errors related to empty contest information and streamlining session state management.
app.py
CHANGED
@@ -193,8 +193,8 @@ with tab1:
|
|
193 |
|
194 |
st.session_state['portfolio_df'] = st.session_state['portfolio_df'][['BaseName', 'EntryCount'] + original_columns]
|
195 |
|
196 |
-
if '
|
197 |
-
del st.session_state['
|
198 |
else:
|
199 |
pass
|
200 |
except:
|
|
|
193 |
|
194 |
st.session_state['portfolio_df'] = st.session_state['portfolio_df'][['BaseName', 'EntryCount'] + original_columns]
|
195 |
|
196 |
+
if 'display_contest_info' in st.session_state and st.session_state['display_contest_info'][st.session_state['display_contest_info']['BaseName'] == 'Backtesting_upload'].empty:
|
197 |
+
del st.session_state['display_contest_info']
|
198 |
else:
|
199 |
pass
|
200 |
except:
|