Skip to content

Commit

Permalink
fixed total_points string type error
Browse files Browse the repository at this point in the history
  • Loading branch information
dabslee committed Jun 17, 2021
1 parent 474fee5 commit 35b4a7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion forum/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(self, student, assignment):
self.grade = self.grade.first()
if self.grade.earned_points:
self.grade = self.grade.earned_points
self.percentgrade = self.grade * 100 / assignment.total_points
self.percentgrade = float(self.grade) * 100 / float(assignment.total_points)
else:
self.grade = "--"
self.percentgrade = "--"
Expand Down

0 comments on commit 35b4a7d

Please sign in to comment.