1
0

fix: null reference when ending highest amount without any shares

This commit is contained in:
2026-06-05 01:35:02 +08:00
parent 1b10d2841f
commit a72155d64a
+2
View File
@@ -42,8 +42,10 @@ class HighestAmount(Scoring):
return 0 return 0
def calculate_end_score(self) -> ItemShare | None: def calculate_end_score(self) -> ItemShare | None:
if self.max:
self.max.score = 1 self.max.score = 1
return self.max return self.max
return None
class FirstThenHighest(Scoring): class FirstThenHighest(Scoring):