lib/barometer/formats/coordinates.rb in barometer-0.5.0 vs lib/barometer/formats/coordinates.rb in barometer-0.6.1
- old
+ new
@@ -24,10 +24,13 @@
# pre-convert
#
pre_query = nil
if original_query.format == :weather_id
- pre_query = Query::Format::WeatherID.reverse(original_query)
+ unless pre_query = original_query.get_conversion(Query::Format::Geocode.format)
+ pre_query = Query::Format::WeatherID.reverse(original_query)
+ original_query.post_conversion(pre_query)
+ end
end
# convert & adjust
#
converted_query = Query::Format::Geocode.geocode(pre_query || original_query)
\ No newline at end of file