Add __repr__ to models

This commit is contained in:
Patrick Smith
2018-09-26 16:50:10 -04:00
committed by Montana
parent 74a5a59dad
commit 8bb9c1ab8a
19 changed files with 123 additions and 0 deletions

View File

@@ -32,3 +32,8 @@ class RequestReview(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
@property
def full_name_ccpo(self):
return "{} {}".format(self.fname_ccpo, self.lname_ccpo)
def __repr__(self):
return "<RequestReview(status='{}', comment='{}', reviewer='{}', id='{}')>".format(
self.status.log_name, self.comment, self.full_name_reviewer, self.id
)