From 7eb261a94563a9ca91e11dd01a43b17e16de7d6f Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Sun, 19 May 2024 11:13:04 +0200 Subject: [PATCH] Sort revisions to be expired more nicely --- hedgedoc-expire.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hedgedoc-expire.py b/hedgedoc-expire.py index 8351620..2a1d911 100644 --- a/hedgedoc-expire.py +++ b/hedgedoc-expire.py @@ -112,7 +112,7 @@ def revisions_to_be_expired(cutoff: datetime) -> list[any]: WHERE "Revisions"."createdAt" < $1 AND "Revisions"."noteId" = "Notes"."id" AND "Notes"."ownerId" = "Users"."id" - ORDER BY "Notes"."createdAt" + ORDER BY "Notes"."createdAt", "Revisions"."createdAt" ''') as revs_older_than: for row in revs_older_than(cutoff): revisions.append({