]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/trace_controller.rb
Ensure :not_found status is returned, catching RecordNotFound doesn't work as isnt...
[rails.git] / app / controllers / trace_controller.rb
index 0603567c45a2310291374aa3b7cb4cb460014281..dc7456c45099ec923731ccd43944be57001bd459 100644 (file)
@@ -16,6 +16,11 @@ class TraceController < ApplicationController
     display_name = params[:display_name]
     if target_user.nil? and !display_name.blank?
       target_user = User.find(:first, :conditions => [ "visible = ? and display_name = ?", true, display_name])
+      if target_user.nil?
+        @not_found_user = display_name
+        render :action => 'no_such_user', :status => :not_found
+        return
+      end
     end
 
     # set title