Commit f43130f7 authored by Julian Rother's avatar Julian Rother
Browse files

Fixed return value on failure in sort_file

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