Skip to content
代码片段 群组 项目
提交 168afa02 编辑于 作者: Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
浏览文件

Merge branch 'bugfix/153/500_when_create_issue' into 'master'

Fix 500 Error When Creating Issue For Project With No Commits

This merge request fixes issue #153, where trying to create an issue for a project with no commits results in a 500 error. This was done by updating the form to check that the repository wasn't empty before trying to load the contribution guide.
No related branches found
No related tags found
无相关合并请求
%div.issue-form-holder %div.issue-form-holder
%h3.page-title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.iid}" %h3.page-title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.iid}"
%hr %hr
- if @repository.contribution_guide && !@issue.persisted? - if !@repository.empty? && @repository.contribution_guide && !@issue.persisted?
- contribution_guide_url = project_blob_path(@project, tree_join(@repository.root_ref, @repository.contribution_guide.name)) - contribution_guide_url = project_blob_path(@project, tree_join(@repository.root_ref, @repository.contribution_guide.name))
.alert.alert-info.col-sm-10.col-sm-offset-2 .alert.alert-info.col-sm-10.col-sm-offset-2
="Please review the <strong>#{link_to "guidelines for contribution", contribution_guide_url}</strong> to this repository.".html_safe ="Please review the <strong>#{link_to "guidelines for contribution", contribution_guide_url}</strong> to this repository.".html_safe
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册