Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/pull/5584'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Feb 1, 2025
2 parents 434b57a + 8508c4f commit 0a44427
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
3 changes: 0 additions & 3 deletions app/controllers/api/relations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,11 @@ def full
node_ids += way_node_ids.flatten
nodes = Node.where(:id => node_ids.uniq).includes(:node_tags)

visible_nodes = {}

@nodes = []
nodes.each do |node|
next unless node.visible? # should be unnecessary if data is consistent.

@nodes << node
visible_nodes[node.id] = node
end

@ways = []
Expand Down
7 changes: 1 addition & 6 deletions app/controllers/api/ways_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,10 @@ def full
@way = Way.includes(:nodes => :node_tags).find(params[:id])

if @way.visible
visible_nodes = {}

@nodes = []

@way.nodes.uniq.each do |node|
if node.visible
@nodes << node
visible_nodes[node.id] = node
end
@nodes << node if node.visible
end

# Render the result
Expand Down

0 comments on commit 0a44427

Please sign in to comment.