emvecchi commited on
Commit
684844a
·
verified ·
1 Parent(s): fd3b7d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -879,8 +879,9 @@ if user_id_from_url and not st.session_state.get("user_id"):
879
  # current index
880
  if 'current_index' not in st.session_state:
881
  start_index = get_start_index()
 
882
  if start_index < len(st.session_state.data)-1:
883
- st.session_state.current_index = start_index
884
  else:
885
  st.session_state.current_index = start_index+1
886
  st.session_state.form_displayed = -2
@@ -962,7 +963,7 @@ elif st.session_state.current_index < len(st.session_state.data):
962
  st.session_state.step += 1
963
  st.rerun()
964
  with c2:
965
- if st.button(":grey[Previous]"):
966
  if step > 0:
967
  st.session_state.step -= 1
968
  st.rerun()
 
879
  # current index
880
  if 'current_index' not in st.session_state:
881
  start_index = get_start_index()
882
+
883
  if start_index < len(st.session_state.data)-1:
884
+ st.session_state.current_index = start_index-1
885
  else:
886
  st.session_state.current_index = start_index+1
887
  st.session_state.form_displayed = -2
 
963
  st.session_state.step += 1
964
  st.rerun()
965
  with c2:
966
+ if st.button(":gray[Previous]"):
967
  if step > 0:
968
  st.session_state.step -= 1
969
  st.rerun()