Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Commit

Permalink
Fix fastest nightfall displaying as zero
Browse files Browse the repository at this point in the history
  • Loading branch information
jgayfer committed Jun 3, 2018
1 parent a5bc487 commit 49fd91d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cogs/models/pve_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 49fd91d

Please sign in to comment.