From a028b4ee6ee79a98799a66e20bc719a3bff69aef Mon Sep 17 00:00:00 2001 From: noirscape Date: Wed, 4 Jan 2023 20:45:44 +0100 Subject: [PATCH] server: fix incorrect values being used --- server/szurubooru/func/posts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/szurubooru/func/posts.py b/server/szurubooru/func/posts.py index d8f7f012..a4d4e185 100644 --- a/server/szurubooru/func/posts.py +++ b/server/szurubooru/func/posts.py @@ -996,8 +996,8 @@ def get_pools_nearby( pool=pool, first_post=pool.posts[0].post_id, last_post=pool.posts[-1].post_id, - prev_post=next_post_id, - next_post=prev_post_id, + prev_post=prev_post_id, + next_post=next_post_id, ) response.append(resp_entry) return response @@ -1011,6 +1011,6 @@ def serialize_pool_posts_nearby( "firstPost": serialize_micro_post(try_get_post_by_id(entry.first_post), None), "lastPost": serialize_micro_post(try_get_post_by_id(entry.last_post), None), "prevPost": serialize_micro_post(try_get_post_by_id(entry.prev_post), None), - "nextPost": serialize_micro_post(try_get_post_by_id(entry.first_post), None), + "nextPost": serialize_micro_post(try_get_post_by_id(entry.next_post), None), } for entry in nearby ]