James McCool commited on
Commit
feaf945
·
1 Parent(s): 75451a2

Refine custom export logic in app.py: update the condition to check for 'export_merge' in session state, enhancing error handling and ensuring smoother user interactions when selecting rows for custom export.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -1210,7 +1210,7 @@ with tab2:
1210
  st.session_state['export_base'] = st.session_state['export_base'].drop_duplicates()
1211
  st.session_state['export_base'] = st.session_state['export_base'].reset_index(drop=True)
1212
  with partial_col:
1213
- if st.session_state['export_merge'] is not None:
1214
  select_custom_index = st.multiselect("Select rows to add to Custom Export", options=st.session_state['export_merge'].index, default=[])
1215
  if st.button("Add selected to Custom Export"):
1216
  st.session_state['export_base'] = pd.concat([st.session_state['export_base'], st.session_state['export_merge'].iloc[select_custom_index]])
 
1210
  st.session_state['export_base'] = st.session_state['export_base'].drop_duplicates()
1211
  st.session_state['export_base'] = st.session_state['export_base'].reset_index(drop=True)
1212
  with partial_col:
1213
+ if 'export_merge' in st.session_state:
1214
  select_custom_index = st.multiselect("Select rows to add to Custom Export", options=st.session_state['export_merge'].index, default=[])
1215
  if st.button("Add selected to Custom Export"):
1216
  st.session_state['export_base'] = pd.concat([st.session_state['export_base'], st.session_state['export_merge'].iloc[select_custom_index]])