hotfix for dynamic scoring

This commit is contained in:
Danhia 2022-02-03 21:02:55 +01:00
parent f8eef0ef3d
commit aadb2ac858
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ class Command(BaseCommand):
nb_solves = len(solves)
if nb_solves > 0:
new_points = 200 - int(log(nb_solves)*8.5)*5
new_points = max(200 - int(log(nb_solves)*8.5)*5, 5)
else:
new_points = 200

View File

@ -27,7 +27,7 @@ def actualize_points(ctf):
solves = CTF_flags.objects.filter(ctf=ctf)
nb_solves = len(solves)
new_points = 200 - int(log(nb_solves)*8.5)*5
new_points = max(200 - int(log(nb_solves)*8.5)*5, 5)
if new_points != ctf.points:
diff = ctf.points - new_points