X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhtsn-import.git;a=blobdiff_plain;f=src%2FTSN%2FXML%2FGameInfo.hs;h=d165c194957c57cac0fe8f11c113a194d5628290;hp=2830295a78d16d898989d0d45df94858c760e3f1;hb=b0fac40d71bca72312293eb33c33c0f0933d0a28;hpb=c8ec4174a46c44215ef9540a9b19b99323fb0717 diff --git a/src/TSN/XML/GameInfo.hs b/src/TSN/XML/GameInfo.hs index 2830295..d165c19 100644 --- a/src/TSN/XML/GameInfo.hs +++ b/src/TSN/XML/GameInfo.hs @@ -102,8 +102,9 @@ data GameInfo = -- They provide foreign keys into any tables storing -- games with their IDs. - schedule_id :: Int, -- ^ Required foreign key into any table storing a - -- schedule along with its ID. + schedule_id :: Maybe Int, -- ^ Optional key into any table storing a + -- schedule along with its ID. We've noticed + -- them missing in e.g. recapxml.dtd documents. time_stamp :: UTCTime, xml :: String } deriving (Eq, Show) @@ -190,7 +191,7 @@ test_accessors = testCase "we can access a parsed game_info" $ do let a4 = game_id t let ex4 = Just 39978 let a5 = schedule_id t - let ex5 = 39978 + let ex5 = Just 39978 let a6 = take 9 (xml t) let ex6 = "" let actual = (a1,a2,a3,a4,a5,a6)