From 1bbe59b6a77030c362f9991083aa7c06799b272d Mon Sep 17 00:00:00 2001 From: Steve Coast Date: Thu, 10 May 2007 20:17:29 +0000 Subject: [PATCH] api fixes --- app/controllers/api_controller.rb | 3 ++- config/environment.rb | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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) diff --git a/config/environment.rb b/config/environment.rb index 35bb86bf0..f343addf9 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -78,3 +78,7 @@ HTTP_EXPECTATION_FAILED = 417 # COUNT = 0 MAX_COUNT = 10 + + + + -- 2.39.5