Skip to content

Commit

Permalink
Course: Fix crash when no assessments
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorNelson committed Jan 9, 2024
1 parent 63a04af commit b4cc23f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dojo_plugin/pages/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def query(module_id):
return Solves.date < user_date
return db.func.sum(
db.case([(DojoModules.id == module_id, cast(query(module_id), db.Integer))
for module_id in assessment_dates],
else_=None)
for module_id in assessment_dates] +
[(False, None)])
).label(label)

solves = (
Expand Down

0 comments on commit b4cc23f

Please sign in to comment.