From: Michael Orlitzky Date: Sun, 6 Jul 2014 20:02:04 +0000 (-0400) Subject: Actuall import the detailed weather items. X-Git-Tag: 0.0.6~10 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhtsn-import.git;a=commitdiff_plain;h=7e1865e656ebbbba9566c7ace61176635fdeabe5 Actuall import the detailed weather items. --- diff --git a/src/TSN/XML/Weather.hs b/src/TSN/XML/Weather.hs index 0866f6f..26935cf 100644 --- a/src/TSN/XML/Weather.hs +++ b/src/TSN/XML/Weather.hs @@ -484,6 +484,14 @@ instance DbImport Message where -- And finally, insert those DB listings. mapM_ insert_ db_listings + -- Now we do the detailed weather items. + case (xml_detailed_weather m) of + Nothing -> return () + Just dw -> do + let detailed_listings = xml_detailed_listings dw + let items = concatMap xml_items detailed_listings + mapM_ (insert_xml_fk_ weather_id) items + return ImportSucceeded