From ac0e0e1b4949cbaae131d1089664d08d9ea59b23 Mon Sep 17 00:00:00 2001 From: Ryan Barrett Date: Wed, 14 Dec 2022 09:50:37 -0800 Subject: [PATCH] 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 --- index.yaml | 6 ++++++ pages.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/index.yaml b/index.yaml index c151a64..7b82325 100644 --- a/index.yaml +++ b/index.yaml @@ -12,6 +12,12 @@ indexes: - name: updated direction: desc +- kind: Response + properties: + - name: domain + - name: status + - name: updated + - kind: Response properties: - name: domain diff --git a/pages.py b/pages.py index 8713a8b..ab7a351 100644 --- a/pages.py +++ b/pages.py @@ -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: