From d0d10992bc7045c0ffbf07c45aad2f061f88bbc3 Mon Sep 17 00:00:00 2001
From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Date: Sat, 3 Aug 2013 11:30:07 +0300
Subject: [PATCH] Fix edit project page when repo does not exist

---
 app/views/projects/edit.html.haml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index dec75ef9abc..ac8affbdc32 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -22,7 +22,7 @@
               .input
                 = f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250
 
-            - if @project.repository.branch_names.any?
+            - if @project.repository.exists? && @project.repository.branch_names.any?
               .clearfix
                 = f.label :default_branch, "Default Branch"
                 .input= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'})
-- 
2.30.9