From f03c6dfde16ef07651b20354ed60996c4103e9d5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 12 Jun 2014 17:25:18 -0400 Subject: [PATCH] Enable import of AutoRacingResults in Main. --- src/Main.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index d5f6612..0b6dce6 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -46,7 +46,8 @@ import Network.Services.TSN.Report ( report_error ) import TSN.DbImport ( DbImport(..), ImportResult(..) ) import qualified TSN.XML.AutoRacingResults as AutoRacingResults ( - dtd ) + dtd, + pickle_message ) import qualified TSN.XML.AutoRacingSchedule as AutoRacingSchedule ( dtd, pickle_message ) @@ -163,7 +164,9 @@ import_file cfg path = do migrate_and_import m = dbmigrate m >> dbimport m importer - | dtd == AutoRacingResults.dtd = undefined + | dtd == AutoRacingResults.dtd = do + let m = unpickleDoc AutoRacingResults.pickle_message xml + maybe (return $ ImportFailed errmsg) migrate_and_import m | dtd == AutoRacingSchedule.dtd = do let m = unpickleDoc AutoRacingSchedule.pickle_message xml -- 2.44.2