server: add none check

This commit is contained in:
noirscape 2023-01-04 21:07:17 +01:00
parent 31d7fe7d90
commit 00e2b503d6

View file

@ -992,7 +992,9 @@ def get_pools_nearby(
for previous_item, current_item, next_item in _get_nearby_iter(pool.posts):
if post.post_id == current_item.post_id:
if previous_item != None:
prev_post_id = previous_item.post_id
if next_item != None:
next_post_id = next_item.post_id
break