forked from rDrama/rDrama
1
0
Fork 0

fix error with 500 page

master
justcool393 2022-10-17 19:16:28 -05:00
parent 39545e556f
commit 3901b2c379
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,9 @@ def error_401(e):
@app.errorhandler(500)
def error_500(e):
if not getattr(g, 'db', None):
print(f'error 500 with no db: {request.full_path}')
return error(e)
g.db.rollback()
return error(e)