From 4e0ce6c20b8b93df350b732563ed6a17d103ddf1 Mon Sep 17 00:00:00 2001 From: Matchu Date: Fri, 25 Jan 2013 11:15:54 -0600 Subject: [PATCH] bugfix: zone-not-found raises error again --- app/models/item/search/query.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/item/search/query.rb b/app/models/item/search/query.rb index b9ac8621..d2abcfb4 100644 --- a/app/models/item/search/query.rb +++ b/app/models/item/search/query.rb @@ -118,8 +118,8 @@ class Item }, :zone => lambda { |label| zone_set = Zone.with_plain_label(label) - unless zone_set - Item::Search.error 'not_found.zone', :zone_name => name + if zone_set.empty? + Item::Search.error 'not_found.zone', :zone_name => label end zone_set.map(&:id) },