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:
|
||||
categ = item['categ']
|
||||
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]])
|
||||
|
||||
return awards_given
|
||||
|
|
Loading…
Reference in New Issue