James McCool commited on
Commit
27fe855
·
1 Parent(s): 07c4c29

Handling the error on contest refresh

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1508,11 +1508,14 @@ if selected_tab == 'Data Load':
1508
  help="Type to search contest names."
1509
  )
1510
  selected_contest = None
1511
- if selected_label != "None":
1512
  selected_idx = contest_labels.index(selected_label)
1513
  selected_contest = contest_options[selected_idx]
1514
 
1515
  if st.button("Load Selected Contest Pricing", key="load_selected_contest_pricing"):
 
 
 
1516
  if selected_contest is None:
1517
  st.warning("Select a contest before loading pricing.")
1518
  st.stop()
 
1508
  help="Type to search contest names."
1509
  )
1510
  selected_contest = None
1511
+ if selected_label is not None and selected_label != "None":
1512
  selected_idx = contest_labels.index(selected_label)
1513
  selected_contest = contest_options[selected_idx]
1514
 
1515
  if st.button("Load Selected Contest Pricing", key="load_selected_contest_pricing"):
1516
+ if selected_label is None:
1517
+ st.warning("Select a contest after refreshing the contest list.")
1518
+ st.stop()
1519
  if selected_contest is None:
1520
  st.warning("Select a contest before loading pricing.")
1521
  st.stop()