From ec6c006235123e6eb3da91ad53af3b1a60ca56b3 Mon Sep 17 00:00:00 2001 From: airano-ir Date: Thu, 21 May 2026 01:09:51 +0200 Subject: [PATCH] =?UTF-8?q?fix(hotfix):=20v3.13.1=20=E2=80=94=20fix=20Impo?= =?UTF-8?q?rtError=20in=20api=5Flist=5Fsites=20(My=20Sites=20broken)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit routes.py still imported MAX_SITES_PER_USER from core.site_api which was removed in v3.13.0. This caused 500 errors on /api/sites, making My Sites appear empty for all users. Fixed to use get_cached_max_sites(). Co-Authored-By: Claude Sonnet 4.6 --- core/dashboard/routes.py | 8 +++++--- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/dashboard/routes.py b/core/dashboard/routes.py index 27a6322..850cc4d 100644 --- a/core/dashboard/routes.py +++ b/core/dashboard/routes.py @@ -5126,14 +5126,16 @@ async def api_list_sites(request: Request) -> Response: if redirect: return JSONResponse({"error": "Unauthorized"}, status_code=401) - from core.site_api import MAX_SITES_PER_USER, get_user_sites + from core.settings import get_cached_max_sites + from core.site_api import get_user_sites sites = await get_user_sites(user_session["user_id"]) + limit = get_cached_max_sites() return JSONResponse( { "sites": sites, - "limit": MAX_SITES_PER_USER, - "remaining": max(0, MAX_SITES_PER_USER - len(sites)), + "limit": limit, + "remaining": max(0, limit - len(sites)), } ) diff --git a/pyproject.toml b/pyproject.toml index b9bf396..07660ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mcphub-server" -version = "3.13.0" +version = "3.13.1" description = "AI-native management hub for WordPress, WooCommerce, and self-hosted services via Model Context Protocol (MCP)" authors = [ {name = "MCP Hub", email = "contact@mcphub.dev"}