feat(usermodel): add repr method to User class
This commit is contained in:
parent
5fcbb6321f
commit
168fd34174
@ -248,3 +248,10 @@ class User:
|
||||
if not User.is_valid_picture(picture):
|
||||
raise ValueError(f"Not a valid image: '{picture}'.")
|
||||
self.picture = picture
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
repr_str = f'User("{self.username}", "{self.password_hash}", ' \
|
||||
f'"{self.email}", "{self.first_name}", "{self.last_name}", ' \
|
||||
f'"{self.display_name}", "{self.picture}")'
|
||||
return repr_str
|
||||
|
Loading…
Reference in New Issue
Block a user