From 005b5ada8fb1d5304bbea42ce783aad83285c031 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Tue, 3 Mar 2026 17:31:21 +0100 Subject: [PATCH] [FIX] Typehint to account for translation promises in menu hook --- allianceauth/menu/hooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/allianceauth/menu/hooks.py b/allianceauth/menu/hooks.py index d751c8e5..095ad4b3 100644 --- a/allianceauth/menu/hooks.py +++ b/allianceauth/menu/hooks.py @@ -3,6 +3,7 @@ from typing import List, Optional from django.template.loader import render_to_string +from django.utils.functional import Promise from allianceauth.menu.constants import DEFAULT_MENU_ITEM_ORDER @@ -30,7 +31,7 @@ class MenuItemHook: def __init__( self, - text: str, + text: str | Promise, classes: str, url_name: str, order: Optional[int] = None,