diff --git a/denis/utilities.py b/denis/utilities.py index 09e34f74..ab0fd4d7 100644 --- a/denis/utilities.py +++ b/denis/utilities.py @@ -17,7 +17,7 @@ def user_to_sub(assignment, component): relevant_gradeables = (grd_tbl.select() .where(grd_tbl.assignment == assignment) .where(grd_tbl.component == component) - .order_by(grd_tbl.timestamp.desc())) + .order_by(-grd_tbl.timestamp)) for user in orbit.db.User.select(): username = user.username sub = (relevant_gradeables diff --git a/orbit/radius.py b/orbit/radius.py index 6ca6a6fb..f4267fd7 100644 --- a/orbit/radius.py +++ b/orbit/radius.py @@ -390,7 +390,7 @@ def handle_activity(rocket): submissions = (mailman.db.Submission.select() .where(mailman.db.Submission.user == rocket.session.username) - .order_by(- mailman.db.Submission.timestamp)) + .order_by(-mailman.db.Submission.timestamp)) def submission_fields(sub): return (datetime.fromtimestamp(sub.timestamp).astimezone().isoformat(), @@ -623,7 +623,7 @@ def handle_dashboard(rocket): grd_tbl = mailman.db.Gradeable user_gradeables = (grd_tbl.select() .where(grd_tbl.user == rocket.session.username) - .order_by(grd_tbl.timestamp.desc())) + .order_by(-grd_tbl.timestamp)) assignments = asmt_tbl.select().order_by(asmt_tbl.initial_due_date) ret = '
' for assignment in assignments: