From c2d709e9ef42a3e334a53a849ca52779b1469da1 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 17 Jul 2023 20:32:41 +0300 Subject: [PATCH] dont allow saves sorting in posts (it results in 500 error) --- files/routes/posts.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/routes/posts.py b/files/routes/posts.py index 15198f23c..44635359b 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -101,6 +101,9 @@ def post_id(pid, v, anything=None, sub=None): else: defaultsortingcomments = "hot" sort = request.values.get("sort", defaultsortingcomments) + if sort == 'saves': + sort = defaultsortingcomments + if not v: result = cache.get(f'post_{p.id}_{sort}') if result: