Yara Kyrychenko commited on
Commit
6f15ef8
·
1 Parent(s): b5f6f54

random pid fix

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -46,7 +46,7 @@ if 'inserted' not in st.session_state:
46
  st.session_state[field] = ''
47
 
48
  st.session_state.user_id = str(random.randint(100000, 999999))
49
- st.session_state.random_pid = st.query_params['id']
50
 
51
  st.session_state.recycling = 0
52
 
@@ -58,6 +58,8 @@ if "page" not in st.session_state:
58
  st.session_state.page = 1
59
  if 'p' not in st.query_params:
60
  st.query_params['p'] = 'g'
 
 
61
 
62
  ### App interface
63
  with st.sidebar:
 
46
  st.session_state[field] = ''
47
 
48
  st.session_state.user_id = str(random.randint(100000, 999999))
49
+ st.session_state.random_pid = st.query_params['id'] if 'id' in st.query_params else "0"
50
 
51
  st.session_state.recycling = 0
52
 
 
58
  st.session_state.page = 1
59
  if 'p' not in st.query_params:
60
  st.query_params['p'] = 'g'
61
+ if 'id' not in st.query_params:
62
+ st.query_params['id'] = st.session_state.random_pid
63
 
64
  ### App interface
65
  with st.sidebar: