From a88655cd202dc43a64a7107f6f533bd386079386 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Mon, 21 Oct 2024 09:57:10 -0300 Subject: Add reviews view :D --- kodereviewer/models/comments.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'kodereviewer/models/comments.py') diff --git a/kodereviewer/models/comments.py b/kodereviewer/models/comments.py index 0d92e23..bc7eee0 100644 --- a/kodereviewer/models/comments.py +++ b/kodereviewer/models/comments.py @@ -60,17 +60,17 @@ class CommentModel(QAbstractListModel): comment: Comment = self._pull_request._comments[index.row()] if role == self.Roles.Body: - return comment.body + return comment._body if role == self.Roles.CreatedAt: - return comment.created_at.strftime("%Y-%M-%d %H:%m") + return comment._created_at.strftime("%Y-%M-%d %H:%m") if role == self.Roles.UpdatedAt: - return comment.updated_at.strftime("%Y-%M-%d %H:%m") + return comment._updated_at.strftime("%Y-%M-%d %H:%m") if role == self.Roles.Username: - return comment.user.username + return comment._user._username if role == self.Roles.AvatarUrl: - return comment.user.avatar_url + return comment._user._avatar_url if role == Qt.ItemDataRole.DisplayRole: - return comment.body + return comment._body return None def rowCount(self, parent: QModelIndex | QPersistentModelIndex = QModelIndex()) -> int: -- cgit v1.2.3-70-g09d2