From 18b989f1dfa02d7343e7aa6b5ac45082cb6fe8da Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 14 2016 08:40:59 +0000 Subject: Fix displaying the branches available for a new PR in the requests template We have changed the format of the data returned by the endpoint listing the branches ready to be in a PR so that it also includes branches that are already in a PR (the info is then displayed on the front page of the project). However, this same internal API endpoint is also called in the page listing all the pull-requests and this page had not been adjusted for this data format change. This commit fixes that. Fixes https://pagure.io/pagure/issue/1310 --- diff --git a/pagure/templates/requests.html b/pagure/templates/requests.html index d1ccc3b..22b0560 100644 --- a/pagure/templates/requests.html +++ b/pagure/templates/requests.html @@ -221,7 +221,7 @@ $(function() { success: function(res) { console.log("done"); if (res.code == 'OK'){ - for (branch in res.message){ + for (branch in res.message.new_branch){ var url = "{{ url_for( 'new_request_pull', repo=repo.name, @@ -260,7 +260,7 @@ $(function() { success: function(res) { console.log("done"); if (res.code == 'OK'){ - for (branch in res.message){ + for (branch in res.message.new_branch){ var url = "{{ url_for( 'new_request_pull', repo=repo.name,