mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-26 01:01:00 +00:00
Fix pagination on home
This commit is contained in:
parent
fb881dd5de
commit
97d40912ed
1 changed files with 4 additions and 4 deletions
|
@ -175,16 +175,16 @@ class MastodonPaginator:
|
|||
|
||||
if since_id:
|
||||
queryset = queryset.filter(
|
||||
models.Q(subject_post_id__gt=max_id)
|
||||
| models.Q(subject_post_interaction_id__gt=max_id)
|
||||
models.Q(subject_post_id__gt=since_id)
|
||||
| models.Q(subject_post_interaction_id__gt=since_id)
|
||||
)
|
||||
|
||||
if min_id:
|
||||
# Min ID requires items _immediately_ newer than specified, so we
|
||||
# invert the ordering to accommodate
|
||||
queryset = queryset.filter(
|
||||
models.Q(subject_post_id__gt=max_id)
|
||||
| models.Q(subject_post_interaction_id__gt=max_id)
|
||||
models.Q(subject_post_id__gt=min_id)
|
||||
| models.Q(subject_post_interaction_id__gt=min_id)
|
||||
).order_by("id")
|
||||
else:
|
||||
queryset = queryset.order_by("-id")
|
||||
|
|
Loading…
Reference in a new issue