1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #6899: Add filterset tests for Token

This commit is contained in:
jeremystretch
2021-08-06 09:41:49 -04:00
parent 51d1b6e0d6
commit 34aa231436
3 changed files with 89 additions and 7 deletions

View File

@@ -209,7 +209,7 @@ class Token(BigIDModel):
def __str__(self):
# Only display the last 24 bits of the token to avoid accidental exposure.
return "{} ({})".format(self.key[-6:], self.user)
return f"{self.key[-6:]} ({self.user})"
def save(self, *args, **kwargs):
if not self.key: