bug fix for UI paging of activities with the after param

sort query ascending so we get the activities immediately after the paging param,, then sort results in memory descending for UI
pull/346/head
Ryan Barrett 2022-12-14 09:50:37 -08:00
rodzic f0eb705841
commit ac0e0e1b49
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -12,6 +12,12 @@ indexes:
- name: updated
direction: desc
- kind: Response
properties:
- name: domain
- name: status
- name: updated
- kind: Response
properties:
- name: domain

Wyświetl plik

@ -243,7 +243,7 @@ def fetch_page(query, model_class):
if before and after:
error("can't handle both before and after")
elif after:
query = query.filter(model_class.updated > after).order(-model_class.updated)
query = query.filter(model_class.updated > after).order(model_class.updated)
elif before:
query = query.filter(model_class.updated < before).order(-model_class.updated)
else: