diff options
Diffstat (limited to 'kodereviewer/project.py')
-rw-r--r-- | kodereviewer/project.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kodereviewer/project.py b/kodereviewer/project.py index d96d47b..e880352 100644 --- a/kodereviewer/project.py +++ b/kodereviewer/project.py @@ -43,10 +43,14 @@ class Project(QObject): def pullRequests(self) -> list[PullRequest]: return self._pull_requests + @Slot(int, result=PullRequest) + def pullRequest(self, number: int) -> Optional[PullRequest]: + return self.find_pull_request(number) + def load_pull_requests(self, response: QByteArray) -> None: data = json.loads(response.toStdString()) self._pull_requests = [ - PullRequest(pr) for pr in data + PullRequest(pr, parent=self) for pr in data ] self.pullRequestsChanged.emit() |