From 2b6f25f0f8cfe1ffb23d2b82bb5ee1ff22e910f0 Mon Sep 17 00:00:00 2001 From: 3252a8 <3252a8@proton.me> Date: Sun, 7 Jun 2026 22:06:47 +0300 Subject: [PATCH] fix: avoid backend theme dependency in docs build --- backend/bot/services/email_templates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/bot/services/email_templates.py b/backend/bot/services/email_templates.py index 69bf3de..47aa5a4 100644 --- a/backend/bot/services/email_templates.py +++ b/backend/bot/services/email_templates.py @@ -16,8 +16,6 @@ from pathlib import Path from typing import TYPE_CHECKING, Optional, Sequence, Tuple from urllib.parse import urlsplit -from config.webapp_themes_config import effective_webapp_theme_accent - if TYPE_CHECKING: from bot.middlewares.i18n import JsonI18n from config.settings import Settings @@ -82,6 +80,8 @@ def _theme_accent(settings: Settings) -> str: catalog = getattr(settings, "webapp_themes_catalog", None) if catalog is None: return primary + from config.webapp_themes_config import effective_webapp_theme_accent + return _safe_color(effective_webapp_theme_accent(catalog, primary)) except Exception: return primary