mirror of https://github.com/JohnHammond/CTFd.git
Handling situation with no solves
parent
3f596d87b1
commit
f4fec18f44
|
@ -740,6 +740,9 @@ def admin_stats():
|
|||
for chal, count, name in solves:
|
||||
solve_data[name] = count
|
||||
|
||||
most_solved = None
|
||||
least_solved = None
|
||||
if len(solve_data):
|
||||
most_solved = max(solve_data, key=solve_data.get)
|
||||
least_solved = min(solve_data, key=solve_data.get)
|
||||
|
||||
|
|
Loading…
Reference in New Issue