Fixed styles, ProjectHook specs etc

This commit is contained in:
Dmitriy Zaporozhets 2013-01-05 00:35:38 +02:00
parent c6298678f5
commit e16cebac3e
22 changed files with 111 additions and 76 deletions

View file

@ -361,8 +361,8 @@ class Project < ActiveRecord::Base
# Discover the default branch, but only if it hasn't already been set to
# something else
if default_branch.nil?
update_attributes(default_branch: discover_default_branch)
if repository && default_branch.nil?
update_attributes(default_branch: self.repository.discover_default_branch)
end
end