Spaces:
Paused
Paused
fix path bug
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def cleanup_workspace(workspace_dir: Path) -> None:
|
|
| 30 |
except Exception as e:
|
| 31 |
_logger.error(f"Error cleaning up workspace: {e}")
|
| 32 |
|
| 33 |
-
def get_template_path(template_name: str, is_new_template: bool = False) ->
|
| 34 |
"""
|
| 35 |
Get template file path
|
| 36 |
:param template_name: Name of the template
|
|
@@ -43,10 +43,10 @@ def get_template_path(template_name: str, is_new_template: bool = False) -> Path
|
|
| 43 |
if "user_id" not in st.session_state:
|
| 44 |
st.session_state.user_id = str(uuid.uuid4())
|
| 45 |
user_settings_path = st.session_state.user_id
|
| 46 |
-
return
|
| 47 |
else:
|
| 48 |
# Use root settings path for existing templates
|
| 49 |
-
return
|
| 50 |
|
| 51 |
def get_all_templates() -> List[str]:
|
| 52 |
"""
|
|
|
|
| 30 |
except Exception as e:
|
| 31 |
_logger.error(f"Error cleaning up workspace: {e}")
|
| 32 |
|
| 33 |
+
def get_template_path(template_name: str, is_new_template: bool = False) -> str:
|
| 34 |
"""
|
| 35 |
Get template file path
|
| 36 |
:param template_name: Name of the template
|
|
|
|
| 43 |
if "user_id" not in st.session_state:
|
| 44 |
st.session_state.user_id = str(uuid.uuid4())
|
| 45 |
user_settings_path = st.session_state.user_id
|
| 46 |
+
return f"{user_settings_path}/{template_name}.yaml"
|
| 47 |
else:
|
| 48 |
# Use root settings path for existing templates
|
| 49 |
+
return f"{template_name}.yaml"
|
| 50 |
|
| 51 |
def get_all_templates() -> List[str]:
|
| 52 |
"""
|