mirror of https://github.com/MISP/misp-dashboard
Fixed keyError new categ
parent
2b3a5be907
commit
3ec4bcb7a4
|
@ -235,7 +235,11 @@ class Contributor_helper:
|
||||||
for item in newTrophy:
|
for item in newTrophy:
|
||||||
categ = item['categ']
|
categ = item['categ']
|
||||||
rank = item['trophy_true_rank']
|
rank = item['trophy_true_rank']
|
||||||
if rank > temp[categ]:
|
try:
|
||||||
|
oldCategRank = temp[categ]
|
||||||
|
except KeyError:
|
||||||
|
oldCategRank = 0
|
||||||
|
if rank > oldCategRank:
|
||||||
awards_given.append(['trophy', [categ, rank]])
|
awards_given.append(['trophy', [categ, rank]])
|
||||||
|
|
||||||
return awards_given
|
return awards_given
|
||||||
|
|
Loading…
Reference in New Issue