forked from MarseyWorld/MarseyWorld
fix error with 500 page
parent
39545e556f
commit
3901b2c379
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue