diff --git a/progit/fork.py b/progit/fork.py index 0383de7..8a78221 100644 --- a/progit/fork.py +++ b/progit/fork.py @@ -71,11 +71,12 @@ def request_pull(repo, requestid, username=None): request = progit.lib.get_pull_request( SESSION, project_id=repo.id, requestid=requestid) - repo = request.repo_from if not request: flask.abort(404, 'Pull-request not found') + repo = request.repo_from + if repo.is_fork: repopath = os.path.join(APP.config['FORK_FOLDER'], repo.path) else: