]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api_controller.rb
Redirect to the reportable after creating a report.
[rails.git] / app / controllers / api_controller.rb
index c6cc3ba5f46cbaf71412b7e414e3f48a0363e2b8..f9b48cb1c5281800d49d5facae8ea0100d94525d 100644 (file)
@@ -157,9 +157,7 @@ class ApiController < ApplicationController
     # - [0] in case some thing links to node 0 which doesn't exist. Shouldn't actually ever happen but it does. FIXME: file a ticket for this
     nodes_to_fetch = (list_of_way_nodes.uniq - node_ids) - [0]
 
-    unless nodes_to_fetch.empty?
-      nodes += Node.includes(:node_tags).find(nodes_to_fetch)
-    end
+    nodes += Node.includes(:node_tags).find(nodes_to_fetch) unless nodes_to_fetch.empty?
 
     visible_nodes = {}
     changeset_cache = {}