Commit 0815fcd4 by ichuang

"None" was still appearing histogram data, causing js errors; fixes.

parent 30543d45
......@@ -75,7 +75,7 @@ def grade_histogram(module_id):
grades = list(cursor.fetchall())
grades.sort(key=lambda x: x[0]) # Add ORDER BY to sql query?
if len(grades) == 1 and grades[0][0] is None:
if len(grades) >= 1 and grades[0][0] is None:
return []
return grades
......
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