Commit a6724208 authored by Javi Ng's avatar Javi Ng

implemented rounding for assignments passing score

parent 15fd58a7
......@@ -17,9 +17,9 @@ class Assignment(models.Model):
perfect_score = models.IntegerField(default=0)
@property
def passing_score(self):
def passing_score(self) -> int:
if self.perfect_score != None:
return self.perfect_score * 0.60
return round(self.perfect_score * 0.60)
def __str__(self):
return self.name
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment