refactor: remove unused imports and streamline code in calculations and navigation services
Some checks failed
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / lint (push) Failing after 14s
CI / deploy (push) Has been skipped

This commit is contained in:
2025-11-14 12:28:48 +01:00
parent bcd993d57c
commit 31b9a1058a
4 changed files with 6 additions and 7 deletions

View File

@@ -1,11 +1,11 @@
from __future__ import annotations
from dataclasses import dataclass, field
from typing import Iterable, List, Optional, Sequence
from typing import Iterable, List, Sequence
from fastapi import Request
from models.navigation import NavigationGroup, NavigationLink
from models.navigation import NavigationLink
from services.repositories import NavigationRepository
from services.session import AuthSession
@@ -92,7 +92,7 @@ class NavigationService:
) -> List[NavigationLinkDTO]:
resolved_roles = tuple(roles)
mapped: List[NavigationLinkDTO] = []
for link in sorted(links, key=lambda l: (l.sort_order, l.id)):
for link in sorted(links, key=lambda x: (x.sort_order, x.id)):
if not include_children and link.parent_link_id is not None:
continue
if not include_disabled and (not link.is_enabled):