From 49fd91d1d87195a98f4e845be2cfc25e83f16302 Mon Sep 17 00:00:00 2001 From: James Gayfer Date: Sun, 3 Jun 2018 16:34:59 -0700 Subject: [PATCH] Fix fastest nightfall displaying as zero --- cogs/models/pve_stats.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cogs/models/pve_stats.py b/cogs/models/pve_stats.py index ffd6bf9..64d3547 100644 --- a/cogs/models/pve_stats.py +++ b/cogs/models/pve_stats.py @@ -56,8 +56,10 @@ def _find_fastest_nightfall(self, pve_stats): if len(pve_stats['scored_heroicNightfall']): times['scored_heroicNightfall'] = pve_stats['scored_heroicNightfall']['allTime']['fastestCompletionMs']['basic']['value'] - return pve_stats[min(times, key=times.get)]['allTime']['fastestCompletionMs']['basic']['displayValue'] - + non_zero_times = {k:v for (k,v) in times.items() if v > 0} + print(non_zero_times) + return pve_stats[min(non_zero_times, key=non_zero_times.get)]['allTime']['fastestCompletionMs']['basic']['displayValue'] + def _sum_nightfalls(self, pve_stats): count = 0