@@ -43,7 +43,7 @@ def load_params(default: bool = False) -> dict[str, Any]:
4343 """
4444
4545 # Check if workspace is enabled. If not, load default parameters.
46- if not st .session_state .settings ["is_workspace_enabled " ]:
46+ if not st .session_state .settings ["enable_workspaces " ]:
4747 default = True
4848
4949 # Construct the path to the parameter file
@@ -82,7 +82,7 @@ def save_params(params: dict[str, Any]) -> None:
8282 """
8383
8484 # Check if the workspace is enabled and if a 'params.json' file exists in the workspace directory
85- if not st .session_state .settings ["is_workspace_enabled " ]:
85+ if not st .session_state .settings ["enable_workspaces " ]:
8686 return
8787
8888 # Update the parameter dictionary with any modified parameters from the current session
@@ -210,7 +210,7 @@ def page_setup(page: str = "") -> dict[str, Any]:
210210 # Define the directory where all workspaces will be stored
211211 workspaces_dir = Path (".." , "workspaces-" + st .session_state .settings ["repository-name" ])
212212 # Check if workspace logic is enabled
213- if st .session_state .settings ["is_workspace_enabled " ]:
213+ if st .session_state .settings ["enable_workspaces " ]:
214214 if "workspace" in st .query_params :
215215 st .session_state .workspace = Path (workspaces_dir , st .query_params .workspace )
216216 elif st .session_state .location == "online" :
@@ -230,7 +230,7 @@ def page_setup(page: str = "") -> dict[str, Any]:
230230 st .session_state ["controllo" ] = True
231231
232232 # If no workspace is specified and workspace feature is enabled, set default workspace and query param
233- if "workspace" not in st .query_params and st .session_state .settings ["is_workspace_enabled " ]:
233+ if "workspace" not in st .query_params and st .session_state .settings ["enable_workspaces " ]:
234234 st .query_params .workspace = st .session_state .workspace .name
235235
236236 # Make sure the necessary directories exist
@@ -266,7 +266,7 @@ def render_sidebar(page: str = "") -> None:
266266 with st .sidebar :
267267 # The main page has workspace switcher
268268 # Display workspace switcher if workspace is enabled in local mode
269- if st .session_state .settings ["is_workspace_enabled " ]:
269+ if st .session_state .settings ["enable_workspaces " ]:
270270 with st .expander ("🖥️ **Workspaces**" ):
271271 # Define workspaces directory outside of repository
272272 workspaces_dir = Path (".." , "workspaces-" + st .session_state .settings ["repository-name" ])
0 commit comments