File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -66,19 +66,19 @@ async def resume_thread(session: WebsocketSession):
66
66
67
67
68
68
def load_user_env (user_env ):
69
+ if user_env :
70
+ user_env_dict = json .loads (user_env )
69
71
# Check user env
70
72
if config .project .user_env :
71
- # Check if requested user environment variables are provided
72
- if user_env :
73
- user_env = json .loads (user_env )
74
- for key in config .project .user_env :
75
- if key not in user_env :
76
- raise ConnectionRefusedError (
77
- "Missing user environment variable: " + key
78
- )
79
- else :
73
+ if not user_env_dict :
80
74
raise ConnectionRefusedError ("Missing user environment variables" )
81
- return user_env
75
+ # Check if requested user environment variables are provided
76
+ for key in config .project .user_env :
77
+ if key not in user_env_dict :
78
+ raise ConnectionRefusedError (
79
+ "Missing user environment variable: " + key
80
+ )
81
+ return user_env_dict
82
82
83
83
84
84
def _get_token_from_cookie (environ : WSGIEnvironment ) -> Optional [str ]:
You can’t perform that action at this time.
0 commit comments