diff --git a/ennstatus/api/model.py b/ennstatus/api/model.py --- a/ennstatus/api/model.py +++ b/ennstatus/api/model.py @@ -36,7 +36,11 @@ def calculate_weight(data): for subkey in ('1_week', '1_month', '3_months', '1_year', '5_years'): - subdata = data[subkey] + try: + subdata = data[subkey] + except KeyError: + continue + factor = subdata['factor'] values = [x * factor for x in subdata['values'] if x is not None] diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ def _get_requirements(): setup(name='Ennstatus', - version='5.0.2', + version='5.0.3', description=('Ennstatus provides the user with vital information about ' 'the status of the organizations Tor servers.'), author='Frënn vun der Ënn',