From f12d7f88a7387f8beceeec5dd83af5b01b81f5bd Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 2 Nov 2026 07:06:52 +1100 Subject: [PATCH] Fix for token issue message (#13150) Fix for translated strings --- src/backend/InvenTree/users/tasks.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/backend/InvenTree/users/tasks.py b/src/backend/InvenTree/users/tasks.py index a412ccf0b9..cbf16d98db 100644 --- a/src/backend/InvenTree/users/tasks.py +++ b/src/backend/InvenTree/users/tasks.py @@ -26,10 +26,12 @@ def notify_api_token(token: ApiToken): if issuer and issuer != user: message = _( - f"A new API token '{token.name}' was issued for your account by {issuer.username}" - ) + "A new API token '{name}' was issued for your account by {issuer}" + ).format(name=token.name, issuer=issuer.username) else: - message = _(f"A new API token '{token.name}' was issued for your account") + message = _("A new API token '{name}' was issued for your account").format( + name=token.name + ) name = _('API Token Issued') context = {