Skip to content

Commit

Permalink
Fix parentheses in boolean statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGlazov committed Jul 2, 2021
1 parent d623108 commit 7e22be5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- 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.
2 changes: 1 addition & 1 deletion src/mod_rating_by_type/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])

Expand Down

0 comments on commit 7e22be5

Please sign in to comment.