Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
fix: add username property when submit app
Browse files Browse the repository at this point in the history
  • Loading branch information
xingren23 committed Dec 17, 2023
1 parent f88a75d commit 6c487b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/new_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ def gen_app_config():
def submit_app():
app_config = gen_app_config()
if app_config:
# check user login
if not st.session_state.get('username'):
st.warning("Please go to homepage for your login :point_left:")
st.stop()

# submit to sqlite
if get_workspace_model().get_app(app_config['name']):
st.session_state['create_submit_info'] = "exist"
Expand All @@ -283,6 +288,7 @@ def submit_app():
app['status'] = 'created'
app['template'] = 'default'
app['image'] = img_bytesio.getvalue()
app['username'] = st.session_state['username']
get_workspace_model().create_app(app)

logger.info(f"submit app successfully, {app_config['name']}")
Expand Down

0 comments on commit 6c487b7

Please sign in to comment.