X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FOdds.hs;h=934c3d340508f89a3d0c40b770ce49c3fd9e975d;hb=09fb9f7ddc30d003224da3fc45142ce2e37c4cbf;hp=4ca64754a41eac1e320a5e45eea569f7dee40c03;hpb=449d86461d8afd7839de750ec48339a4c0f735d0;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/Odds.hs b/src/TSN/XML/Odds.hs index 4ca6475..934c3d3 100644 --- a/src/TSN/XML/Odds.hs +++ b/src/TSN/XML/Odds.hs @@ -166,7 +166,7 @@ data OddsGameHomeTeamXml = -- so we ignore the probable -- upper bound of three -- characters. - xml_home_team_rotation_number :: Int, + xml_home_team_rotation_number :: Maybe Int, xml_home_team_abbr :: String, xml_home_team_name :: String, xml_home_team_starter :: Maybe (Int, String), -- ^ (id, name) @@ -209,7 +209,7 @@ data OddsGameAwayTeamXml = -- on lengthless text fields, so -- we ignore the probable upper -- bound of three characters - xml_away_team_rotation_number :: Int, + xml_away_team_rotation_number :: Maybe Int, xml_away_team_abbr :: String, xml_away_team_name :: String, xml_away_team_starter :: Maybe (Int, String), -- ^ (id, name) @@ -284,8 +284,8 @@ data OddsGame = db_home_team_id :: DefaultKey Team, db_game_id :: Int, db_game_time :: UTCTime, -- ^ Contains both the date and time. - db_away_team_rotation_number :: Int, - db_home_team_rotation_number :: Int, + db_away_team_rotation_number :: Maybe Int, + db_home_team_rotation_number :: Maybe Int, db_away_team_starter_id :: Maybe Int, db_away_team_starter_name :: Maybe String, db_home_team_starter_id :: Maybe Int, @@ -619,7 +619,7 @@ pickle_home_team = xpWrap (from_tuple, to_tuple) $ xp6Tuple (xpElem "HomeTeamID" xpText) - (xpElem "HomeRotationNumber" xpInt) + (xpElem "HomeRotationNumber" (xpOption xpInt)) (xpElem "HomeAbbr" xpText) (xpElem "HomeTeamName" xpText) (-- This is an ugly way to get both the HStarter ID attribute @@ -645,7 +645,7 @@ pickle_away_team = xpWrap (from_tuple, to_tuple) $ xp6Tuple (xpElem "AwayTeamID" xpText) - (xpElem "AwayRotationNumber" xpInt) + (xpElem "AwayRotationNumber" (xpOption xpInt)) (xpElem "AwayAbbr" xpText) (xpElem "AwayTeamName" xpText) (-- This is an ugly way to get both the AStarter ID attribute