Update the signature of the teardown function (#3730)

Co-authored-by: David Lord <davidism@gmail.com>
This commit is contained in:
Jamiu Salimon 2020-10-15 22:02:54 +01:00 committed by GitHub
parent fa5aebc842
commit 9d824db41c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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: