forked from gergely/calendar-social
		
	Update User and Role so they have a proper __repr__ method
This commit is contained in:
		@@ -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})>'
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user