Skip to content

Commit c7d3319

Browse files
Add compatibility with custom user models
1 parent 9408288 commit c7d3319

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ninja_apikey/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ def is_valid(self):
2929
return self.expires_at >= timezone.now()
3030

3131
def __str__(self):
32-
return f"{self.user.username}<{self.prefix}>"
32+
return f"{self.user.get_username()}<{self.prefix}>"

0 commit comments

Comments
 (0)