mirror of https://github.com/pallets/flask.git
Update the signature of the teardown function (#3730)
Co-authored-by: David Lord <davidism@gmail.com>
This commit is contained in:
parent
fa5aebc842
commit
9d824db41c
|
@ -119,7 +119,7 @@ For example, you can manage a database connection using this pattern::
|
|||
return g.db
|
||||
|
||||
@app.teardown_appcontext
|
||||
def teardown_db():
|
||||
def teardown_db(exception):
|
||||
db = g.pop('db', None)
|
||||
|
||||
if db is not None:
|
||||
|
|
Loading…
Reference in New Issue