From f8812d8e2e4a681391f41f93bacffff10f0e9782 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 21 2015 10:14:20 +0000 Subject: Adjust the PullRequest JSON representation to account for remote pull-requests --- diff --git a/pagure/lib/model.py b/pagure/lib/model.py index 1df3900..f5cd459 100644 --- a/pagure/lib/model.py +++ b/pagure/lib/model.py @@ -841,7 +841,9 @@ class PullRequest(BASE): 'branch': self.branch, 'project': self.project.to_json(public=public, api=api), 'branch_from': self.branch_from, - 'repo_from': self.project_from.to_json(public=public, api=api), + 'repo_from': self.project_from.to_json( + public=public, api=api) if self.project_from else None, + 'remote_git': self.remote_git, 'date_created': self.date_created.strftime('%s'), 'user': self.user.to_json(public=public), 'assignee': self.assignee.to_json(