From 95648d1f138b6af7d1053bb120c32717aa093e30 Mon Sep 17 00:00:00 2001 From: Fedor Glazov Date: Sat, 14 Aug 2021 21:20:36 +0200 Subject: [PATCH] Create bucket if it wasn't there before. --- changelog.txt | 6 +++++- src/mod_stats_by_aircraft/aircraft_stats_compute.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index c3d3a97..2be95cc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -115,4 +115,8 @@ Version 1.4.2 Version 1.4.3 - Fix crash on retroactive compute of some old pilot snipes. -- Defensive ammo breakdown is now correctly recomputed. \ No newline at end of file +- Defensive ammo breakdown is now correctly recomputed. + +Version 1.4.4 + +- Fix bug where retroactive compute would sometimes hang on processing best aircraft streaks. \ No newline at end of file diff --git a/src/mod_stats_by_aircraft/aircraft_stats_compute.py b/src/mod_stats_by_aircraft/aircraft_stats_compute.py index 2975f68..a9f5b80 100644 --- a/src/mod_stats_by_aircraft/aircraft_stats_compute.py +++ b/src/mod_stats_by_aircraft/aircraft_stats_compute.py @@ -679,7 +679,7 @@ def process_streaks_and_best_sorties(bucket, sortie): aircraft=bucket.aircraft, filter_type=bucket.filter_type, player=None, - ).get() + ).get_or_create()[0] if bucket.max_score_streak > not_player_bucket.max_score_streak: not_player_bucket.max_score_streak = bucket.max_score_streak