Ensure numeric values are strings (#840)

This prevents record/score values from being being interpreted as False
and excluded from bracketed blocks in formatp.
This commit is contained in:
Erik Johnson 2022-03-22 16:00:45 -05:00 committed by GitHub
parent c4876ed551
commit 90887964e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,16 +272,19 @@ class MLB(ScoresBackend):
ret[f'{team}_wins'] = self.get_nested(
team_data,
'leagueRecord:wins',
callback=self.zero_fallback,
default=0)
ret[f'{team}_losses'] = self.get_nested(
team_data,
'leagueRecord:losses',
callback=self.zero_fallback,
default=0)
ret[f'{team}_score'] = self.get_nested(
linescore,
f'teams:{team}:runs',
default='0')
callback=self.zero_fallback,
default=0)
for key in ('delay', 'postponed', 'suspended'):
ret[key] = ''