Commit f43130f7 authored by Julian Rother's avatar Julian Rother

Fixed return value on failure in sort_file

parent 7182a338
......@@ -74,7 +74,7 @@ def sort_file(filename, course=None, lectures=None):
handle = '-'.join(splitfilename[:2])
courses = query('SELECT * FROM courses WHERE handle = ?', handle)
if not courses:
return []
return [], 0
course = courses[0]
if not lectures:
lectures = query('SELECT * from lectures where course_id = ?', course['id'])
......
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