forked from orbit-oss/flask
Update docs/patterns/deferredcallbacks.rst
fix example code in Deferred Callback docs: don't set response upon executing callback
This commit is contained in:
parent
ff2e8449ff
commit
b4fc4412e8
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ this the following function needs to be registered as
|
|||
@app.after_request
|
||||
def call_after_request_callbacks(response):
|
||||
for callback in getattr(g, 'after_request_callbacks', ()):
|
||||
response = callback(response)
|
||||
callback(response)
|
||||
return response
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue