feat: sidebar Repository identique au Workspace-local, pages forge unifiees, GC miroirs vides
This commit is contained in:
@@ -18,6 +18,7 @@ from ._common import (
|
||||
WORKSPACE_COOKIE,
|
||||
_build_breadcrumb,
|
||||
_build_tree_children,
|
||||
_cleanup_empty_mirrors,
|
||||
_file_page_disk_path,
|
||||
_get_active_workspace,
|
||||
_get_user_id,
|
||||
@@ -64,6 +65,12 @@ def local_workspace_page(request: Request, folder: int = None, ws: int = None):
|
||||
).fetchone()
|
||||
if requested is not None:
|
||||
ws_row = dict(requested)
|
||||
# Switching workspace: drop other EMPTY forge mirrors (no file or
|
||||
# folder ever created there) instead of keeping empty locals.
|
||||
try:
|
||||
_cleanup_empty_mirrors(user["id"], keep_id=ws_row["id"])
|
||||
except Exception:
|
||||
pass
|
||||
# L'URL fait foi : on aligne le cookie pour que le reste de
|
||||
# l'application (sidebar, API tree, breadcrumbs) suive le même
|
||||
# workspace que celui affiché.
|
||||
|
||||
Reference in New Issue
Block a user