Fix: Post view count does not update properly.
This commit is contained in:
parent
0454a64020
commit
fb77cbcc2b
1 changed files with 1 additions and 1 deletions
|
@ -236,7 +236,7 @@ def post_id(pid, anything=None, v=None, sub=None):
|
||||||
|
|
||||||
post.views += 1
|
post.views += 1
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
g.db.flush()
|
g.db.commit()
|
||||||
|
|
||||||
if request.headers.get("Authorization"): return post.json
|
if request.headers.get("Authorization"): return post.json
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue