diff --git a/files/routes/posts.py b/files/routes/posts.py index f2d4a4ffbf..f7fcee3afb 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -37,7 +37,8 @@ def _add_post_view(pid): p.views += 1 db.add(p) - db.commit() + try: db.commit() + except: db.rollback() db.close() stdout.flush()