From dc9003b8d44a6042b5429ec28d66b2f7af1af432 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 7 Mar 2014 14:59:29 -0500 Subject: [PATCH] In the event of a misconfigured locale, don't raise an exception. --- lib/search.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/search.rb b/lib/search.rb index bf198b704..2579e6b70 100644 --- a/lib/search.rb +++ b/lib/search.rb @@ -86,6 +86,9 @@ class Search add_more_topics_if_expected @results + rescue ActiveRecord::StatementInvalid + # In the event of a PG:Error return nothing, it is likely they used a foreign language whose + # locale is not supported by postgres end # Add more topics if we expected them