remotes/1693045480750635534/spooky-22
parent
2bbc7e1468
commit
0bd32529bd
|
@ -364,7 +364,7 @@ def random_post(v):
|
||||||
total = x.count()
|
total = x.count()
|
||||||
n = random.randint(0, total - 1)
|
n = random.randint(0, total - 1)
|
||||||
|
|
||||||
post = x.order_by(Submission.id.asc()).offset(n).limit(1).first()
|
post = x.offset(n).limit(1).first()
|
||||||
return redirect(post.permalink)
|
return redirect(post.permalink)
|
||||||
|
|
||||||
@cache.memoize(timeout=86400)
|
@cache.memoize(timeout=86400)
|
||||||
|
|
Loading…
Reference in New Issue