diff --git a/changelog.txt b/changelog.txt index 6b388c7..4acbc41 100644 --- a/changelog.txt +++ b/changelog.txt @@ -78,4 +78,8 @@ Version 2.2.0 - Module SplitRankings: Reset fighter/attacker/bomber streaks only when you die in the corresponding type. This applies to the main page of the website (best living fighter/attacker/bomber pilots). - New module "Top Last Mission", which replaces top of last 24 hours with top player in the last mission. Mainly meant for event servers where the action doesn't happen 24/7. - New module "Rearm Accuracy Workaround", which stops sorties where a player took off twice (and thus presumambly rearmed) from being counted towards player accuracy. The total nr shots fired is reset when you rearm in the logs, and there is no way to recover how many shots you fired before the rearm. This is a workaround whichs bandaids the problem. -- New module "Bailout Accuracy Workaround", which stops sorties where a player bailed out from being counted towards player accuracy. The number of shots is set to the max possible (= how many shots you started with) in sorties where you bailout, and again it is a bug in the game logs, and as such impossible to count the number of shots. This is a workaround whichs bandaids the problem. \ No newline at end of file +- New module "Bailout Accuracy Workaround", which stops sorties where a player bailed out from being counted towards player accuracy. The number of shots is set to the max possible (= how many shots you started with) in sorties where you bailout, and again it is a bug in the game logs, and as such impossible to count the number of shots. This is a workaround whichs bandaids the problem. + +Version 2.2.1 + +- Fix bug where damaged sortie logs without attached hits were causing a 500 error in pilot sortie logs. \ No newline at end of file diff --git a/src/mod_rating_by_type/views.py b/src/mod_rating_by_type/views.py index da98fef..6a1c5a1 100644 --- a/src/mod_rating_by_type/views.py +++ b/src/mod_rating_by_type/views.py @@ -715,7 +715,7 @@ def pilot_sortie_log(request, sortie_id): e.opponent_object = e.cact_object e.opponent_act = False - if (e.type == 'damaged' or e.type == 'wounded' and type(e.extra_data['damage']) is dict + if ((e.type == 'damaged' or e.type == 'wounded') and type(e.extra_data['damage']) is dict and 'hits' in e.extra_data['damage']): e.extra_data['damage']['translated_hits'] = translate_damage_log_bullets(e.extra_data['damage']['hits'])