logging_level/ fix subgroup migrations and more

This commit is contained in:
Vladless
2025-10-12 20:59:18 +03:00
parent 50c73821a6
commit 8d80360615
28 changed files with 462 additions and 281 deletions
+3 -1
View File
@@ -44,6 +44,8 @@ async def delete_server(session: AsyncSession, server_name: str):
async def get_servers(session: AsyncSession, include_enabled: bool = False) -> dict:
from handlers.utils import ALLOWED_GROUP_CODES
try:
stmt = select(Server)
result = await session.execute(stmt)
@@ -68,7 +70,7 @@ async def get_servers(session: AsyncSession, include_enabled: bool = False) -> d
for sid, gc in r2.all():
groups_map.setdefault(sid, []).append(gc)
allowed = {"trial", "discounts", "discounts_max"}
allowed = set(ALLOWED_GROUP_CODES)
grouped = {}
for s in servers: