Skip to content

Commit 80192a1

Browse files
author
Bojan Jovanovic
committed
Fix for median, I accidently list of tuples, now flattened it, so median works.
1 parent a2eb754 commit 80192a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyconbalkan/cfp/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Cfp(models.Model):
2828
@property
2929
def rating(self):
3030
try:
31-
return median(self.ratings.all().values_list('mark'))
31+
return median(self.ratings.all().values_list('mark', flat=True))
3232
except StatisticsError:
3333
return "N/A"
3434

0 commit comments

Comments
 (0)