]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Actuall import the detailed weather items.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 6 Jul 2014 20:02:04 +0000 (16:02 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 6 Jul 2014 20:02:04 +0000 (16:02 -0400)
src/TSN/XML/Weather.hs

index 0866f6f09ee7a666f54da7cb4ce47e1f60e8c47a..26935cf83b84068a49001e4f700170ed348dbd2f 100644 (file)
@@ -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