fixing vendor context detection bug

This commit is contained in:
2025-11-18 23:41:51 +01:00
parent d947fa5ca0
commit c10bdfdf42

View File

@@ -88,8 +88,11 @@ class ContextManager:
return RequestContext.ADMIN return RequestContext.ADMIN
# 3. Vendor Dashboard context (vendor management area) # 3. Vendor Dashboard context (vendor management area)
if ContextManager._is_vendor_dashboard_context(path): # Check both clean_path and original path for vendor dashboard
logger.debug("[CONTEXT] Detected as VENDOR_DASHBOARD", extra={"path": path}) original_path = request.url.path
if ContextManager._is_vendor_dashboard_context(path) or \
ContextManager._is_vendor_dashboard_context(original_path):
logger.debug("[CONTEXT] Detected as VENDOR_DASHBOARD", extra={"path": path, "original_path": original_path})
return RequestContext.VENDOR_DASHBOARD return RequestContext.VENDOR_DASHBOARD
# 4. Shop context (vendor storefront) # 4. Shop context (vendor storefront)