Skip to content

Commit

Permalink
Remove passcode remnants
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu93 committed Oct 6, 2023
1 parent 8c6f692 commit 63470aa
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions samples/ServalApp/serval_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,10 @@ def is_valid_passcode(passcode:str):
st.session_state['email'] = st.text_input(label="Email", placeholder="[email protected]")
if st.session_state.get('email','') == '' and tried_to_submit:
st.warning("Please enter an email address", icon='⬆️')

st.session_state['passcode'] = st.text_input(label="Passcode", placeholder="")
if st.session_state.get('passcode','') == '' and tried_to_submit:
st.warning("Please enter the passcode", icon='⬆️')

if tried_to_submit:
st.error(st.session_state.get('error',"Something went wrong. Please try again in a moment."))
if st.form_submit_button("Generate translations"):
if not is_valid_passcode(st.session_state.get('passcode','')):
st.session_state['tried_to_submit'] = True
st.session_state['error'] = "The passcode was invalid."
st.rerun()
elif already_active_build_for(st.session_state['email']):
if already_active_build_for(st.session_state['email']):
st.session_state['tried_to_submit'] = True
st.session_state['error'] = "There is already an a pending or active build associated with this email address. Please wait for the previous build to finish."
st.rerun()
Expand Down

0 comments on commit 63470aa

Please sign in to comment.