]> git.openstreetmap.org Git - rails.git/commitdiff
api fixes
authorSteve Coast <steve@asklater.com>
Thu, 10 May 2007 20:17:29 +0000 (20:17 +0000)
committerSteve Coast <steve@asklater.com>
Thu, 10 May 2007 20:17:29 +0000 (20:17 +0000)
app/controllers/api_controller.rb
config/environment.rb

index 8e4004dd15652aa3bb4f1dfa5c7cf83da2f5f5fe..35a0f25b75a2332308b3c1856aef2e3d72e03aa4 100644 (file)
@@ -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)
index 35bb86bf076611d0c2e5c015950f975c4bd8af4d..f343addf9f0ea178732004b9c7ba6596f3105605 100644 (file)
@@ -78,3 +78,7 @@ HTTP_EXPECTATION_FAILED = 417
 #
 COUNT = 0
 MAX_COUNT = 10
+
+
+
+