Update User and Role so they have a proper __repr__ method
This commit is contained in:
parent
e7f891d648
commit
495df6d709
@ -38,7 +38,7 @@ class User(db.Model, UserMixin):
|
||||
secondary=users_roles,
|
||||
backref=db.backref('users', lazy='dynamic'))
|
||||
|
||||
def __str__(self):
|
||||
def __repr__(self):
|
||||
return f'<User {self.id}({self.username})>'
|
||||
|
||||
|
||||
@ -51,3 +51,6 @@ class Role(db.Model, RoleMixin):
|
||||
|
||||
#: A description of the role
|
||||
description = db.Column(db.UnicodeText)
|
||||
|
||||
def __repr__(self):
|
||||
return f'<Role {self.id}({self.name})>'
|
||||
|
Loading…
Reference in New Issue
Block a user