修复测试版版本库访问500问题

This commit is contained in:
huang 2017-06-05 15:35:16 +08:00
parent 9f73980765
commit cda61e73fa
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -2,7 +2,7 @@
<div class="repository_con" style="line-height:1.9;">
<ul class="clearfix pro-top-info mb10">
<li><i class="icon-time mr5 c_grey02 f16 fb"></i>
<%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)}",
<%=link_to "#{choise_commit_count(@changesets_all_count.to_i, @g_project.commit_count.to_i)}",
{:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param,
:rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"}, :class => "linkBlue fb" %> 提交
</li>