X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FWeather.hs;h=26935cf83b84068a49001e4f700170ed348dbd2f;hb=7e1865e656ebbbba9566c7ace61176635fdeabe5;hp=0866f6f09ee7a666f54da7cb4ce47e1f60e8c47a;hpb=d0c987bed61caac6bc087bbc054bbf0a4d5da552;p=dead%2Fhtsn-import.git 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