Ticket #426: noways.patch

File noways.patch, 568 bytes (added by Tom Hughes, 12 years ago)

Patch to stop 500 errors for areas with no ways

  • app/controllers/api_controller.rb

     
    194194      list_of_way_segs.flatten!
    195195
    196196      list_of_way_segments = list_of_way_segs.collect { |way_seg| way_seg.segment_id }
    197 
     197    else
     198      list_of_way_segments = Array.new
    198199    end
    199200
    200201    # - [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