X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/21fd6d31263565159a081e85a3450a7f3de33c6a..1bbe59b6a77030c362f9991083aa7c06799b272d:/app/controllers/api_controller.rb diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 8e4004dd1..35a0f25b7 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -197,7 +197,8 @@ class ApiController < ApplicationController end - segments_to_fetch = list_of_way_segments.uniq - segment_ids + # - [0] in case some thing links to segment 0 which doesn't exist. Shouldn't actually ever happen but it does. FIXME: file a ticket for this + segments_to_fetch = (list_of_way_segments.uniq - segment_ids) - [0] if segments_to_fetch.length > 0 segments += Segment.find(segments_to_fetch)