fsd
This commit is contained in:
parent
123cc81604
commit
d456aaa0c7
18 changed files with 119 additions and 119 deletions
|
@ -389,7 +389,7 @@ def random_post(v):
|
|||
total = x.count()
|
||||
n = random.randint(1, total - 2)
|
||||
|
||||
post = x.offset(n).limit(1).first()
|
||||
post = x.offset(n).limit(1).one_or_none()
|
||||
return redirect(f"/post/{post.id}")
|
||||
|
||||
@cache.memoize(timeout=86400)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue