Sort revisions to be expired more nicely

This commit is contained in:
Stefan Bethke 2024-05-19 11:13:04 +02:00
parent 5458f21624
commit 7eb261a945

View file

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