소스 검색

fix upload file not set state before return (#1227)

Sheldon 1 년 전
부모
커밋
aeb04e9130
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      pynecone/app.py

+ 3 - 0
pynecone/app.py

@@ -610,6 +610,9 @@ def upload(app: App):
         )
         # TODO: refactor this to handle yields.
         update = await state._process(event).__anext__()
+
+        # Set the state for the session.
+        app.state_manager.set_state(event.token, state)
         return update
 
     return upload_file