Fix: Use correct API Key label for v2 token message

On v2 tokens, {t} prints the key not the token. Update the message
to say "API Key" and restore the auth header prefix hint.
This commit is contained in:
Valentin Lobstein 2026-03-13 09:33:23 +01:00
parent 8057c40a51
commit 56909d6ef4
No known key found for this signature in database
GPG key ID: F053C2B15CE40815

View file

@ -34,4 +34,4 @@ if not User.objects.filter(username=su_name):
print(f"💡 Superuser Username: {su_name}, E-Mail: {su_email}") print(f"💡 Superuser Username: {su_name}, E-Mail: {su_email}")
else: else:
t = Token.objects.create(user=u, token=su_api_token, version=TokenVersionChoices.V2) t = Token.objects.create(user=u, token=su_api_token, version=TokenVersionChoices.V2)
print(f"💡 Superuser Username: {su_name}, E-Mail: {su_email}, API Token: {t}") print(f"💡 Superuser Username: {su_name}, E-Mail: {su_email}, API Key: {t}, (use with '{t.get_auth_header_prefix()}<Your token>')")