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 )
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