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({