From 9498c438cd4bf42bd5fd1bd856f24dc4f286317a Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Wed, 22 Apr 2020 14:33:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9hash=5Fcommit=E7=9A=84json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/commits.json.jbuilder | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/repositories/commits.json.jbuilder b/app/views/repositories/commits.json.jbuilder index 7bee6fd18..eacd1e6cf 100644 --- a/app/views/repositories/commits.json.jbuilder +++ b/app/views/repositories/commits.json.jbuilder @@ -1,4 +1,8 @@ -unless @hash_commit[:status].present? #如果有状态值,则表示报错了 +Rails.logger.info("#######_______@hash_commit______############{@hash_commit}") +if @hash_commit[:status].present? #如果有状态值,则表示报错了 + json.total_count 0 + json.commits [] +else json.total_count @hash_commit[:total_count] json.commits do json.array! @hash_commit[:body] do |commit|