Skip to content

Commit 477f321

Browse files
authored
Cast sub_id to integer in SQL query order
1 parent 1607f9d commit 477f321

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/export_course.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def main():
140140
"""SELECT sub_id, sub_title, date, summary
141141
FROM lectures
142142
WHERE course_id = ? AND summary IS NOT NULL
143-
ORDER BY date ASC, sub_id ASC""",
143+
ORDER BY date ASC, CAST(sub_id AS INTEGER) ASC""",
144144
(args.course_id,),
145145
).fetchall()
146146
lectures = [dict(row) for row in rows]

0 commit comments

Comments
 (0)