diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-02-17 15:52:35 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-02-17 15:52:35 +0000 |
commit | 6483a4c7b1033f357eda3436bc7054c59e2f9b3f (patch) | |
tree | 43d345fd4befc76d474a9f9c4e79815d323583d3 /app/models | |
parent | 28d42a33f3385b57660906d4ca35e96d56785d7e (diff) | |
parent | 3d3ac87af991319d6960a963c0975c83bf7e4108 (diff) | |
download | gitlab-ce-6483a4c7b1033f357eda3436bc7054c59e2f9b3f.tar.gz |
Merge branch 'fix/13367-redirect-to-project-page-if-no-import' into 'master'
Redirect /import to project page if no importing at all and repo exists
Fixes gitlab-org/gitlab-ce#13367.
See merge request !2857
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index a43878ebcad..95ad88c76ae 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -382,6 +382,10 @@ class Project < ActiveRecord::Base external_import? || forked? end + def no_import? + import_status == 'none' + end + def external_import? import_url.present? end |