Explorar el Código

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

Sheldon hace 1 año
padre
commit
aeb04e9130
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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.
         # TODO: refactor this to handle yields.
         update = await state._process(event).__anext__()
         update = await state._process(event).__anext__()
+
+        # Set the state for the session.
+        app.state_manager.set_state(event.token, state)
         return update
         return update
 
 
     return upload_file
     return upload_file