diff options
author | Linus G Thiel <linus@yesbabyyes.se> | 2016-10-05 20:31:33 +0300 |
---|---|---|
committer | Linus G Thiel <linus@yesbabyyes.se> | 2016-10-05 20:38:16 +0300 |
commit | ff378e19e6dc385f1c85b7704263129a56778752 (patch) | |
tree | 56beedeeed01cd171cc3e6f409ff02e080112947 /app/controllers/projects/tags_controller.rb | |
parent | 6b9671388d523a03b058e1cc467de77d805fc7a2 (diff) |
Respond with 404 Not Found for non-existent tags
Non-existent tags should be handled with 404 Not Found.
Diffstat (limited to 'app/controllers/projects/tags_controller.rb')
-rw-r--r-- | app/controllers/projects/tags_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/tags_controller.rb b/app/controllers/projects/tags_controller.rb index 40899abf6ee..8fea20cefef 100644 --- a/app/controllers/projects/tags_controller.rb +++ b/app/controllers/projects/tags_controller.rb @@ -20,7 +20,7 @@ class Projects::TagsController < Projects::ApplicationController def show @tag = @repository.find_tag(params[:id]) - return render_404 if @tag.nil? + return render_404 unless @tag @release = @project.releases.find_or_initialize_by(tag: @tag.name) @commit = @repository.commit(@tag.target) |