From cda61e73fafcb93db32a0fc7e4d8bc17019a1417 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 5 Jun 2017 15:35:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E7=89=88?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E8=AE=BF=E9=97=AE500=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 2 +- app/views/repositories/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 85c22e661..d8fdb601d 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -284,7 +284,7 @@ class ShixunsController < ApplicationController raise "sync failed" if @shixun.gpid.blank? rescue Exception => e @shixun.update_attribute(:gpid, nil) - if @repository.id + if @repository && @repository.id @repository.destroy end end diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index c5fa4876c..319fc9a4d 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -2,7 +2,7 @@