Fix crash in discount computation when cloning series to single event

This commit is contained in:
Raphael Michel
2024-01-19 15:40:22 +01:00
parent a09275c582
commit 4234a6440d
+1 -1
View File
@@ -344,7 +344,7 @@ class Discount(LoggedModel):
elif self.subevent_mode == self.SUBEVENT_MODE_SAME:
def key(idx):
return positions[idx][1] # subevent_id
return positions[idx][1] or 0 # subevent_id
# Build groups of candidates with the same subevent, then apply our regular algorithm
# to each group