Skip to content

Commit 304dea8

Browse files
committed
realising how different of a person i was back then
1 parent 77402db commit 304dea8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -702,10 +702,10 @@ def history(page: int):
702702
query_list = [f"p.id = '{post_id}'" for post_id in range(current_id - (5 * page) + 1, current_id - (5 * (page - 1)) + 1)]
703703
query_str = " OR ".join(query_list)
704704

705-
try:
706-
query_result = post_container.query_items(f"SELECT * FROM Posts p WHERE {query_str}", enable_cross_partition_query=True)
707-
post_list = stuffimporter.itempaged_to_list(query_result)
708-
except StopIteration:
705+
query_result = post_container.query_items(f"SELECT * FROM Posts p WHERE {query_str}", enable_cross_partition_query=True)
706+
post_list = stuffimporter.itempaged_to_list(query_result)
707+
708+
if not post_list:
709709
abort(404)
710710

711711
return render_template("history.html", post_list=reversed(post_list), hist_page=page)

0 commit comments

Comments
 (0)