fix: Next and last goal logic
This commit is contained in:
@@ -92,12 +92,11 @@ async def prepare_subathon(
|
|||||||
name=goal.description,
|
name=goal.description,
|
||||||
)
|
)
|
||||||
goalps.append(goalp)
|
goalps.append(goalp)
|
||||||
if goal.required_score >= total_score:
|
if goal.required_score <= total_score:
|
||||||
last_goalp = goalp
|
last_goalp = goalp
|
||||||
goals_met += 1
|
goals_met += 1
|
||||||
else:
|
elif next_goalp is None:
|
||||||
next_goalp = goalp
|
next_goalp = goalp
|
||||||
break
|
|
||||||
|
|
||||||
# Build the last contribution information
|
# Build the last contribution information
|
||||||
contribs = await subathon.fetch_contributions().limit(1)
|
contribs = await subathon.fetch_contributions().limit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user