feat(usermodel): add repr method to User class
This commit is contained in:
parent
5fcbb6321f
commit
168fd34174
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue