|
|
@ -11,6 +11,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
import sys |
|
|
|
import sys |
|
|
|
from functools import update_wrapper |
|
|
|
from functools import update_wrapper |
|
|
|
|
|
|
|
from copy import deepcopy |
|
|
|
|
|
|
|
|
|
|
|
from werkzeug.exceptions import HTTPException |
|
|
|
from werkzeug.exceptions import HTTPException |
|
|
|
|
|
|
|
|
|
|
@ -152,7 +153,7 @@ def copy_current_request_context(f): |
|
|
|
'when a request context is on the stack. For instance within ' |
|
|
|
'when a request context is on the stack. For instance within ' |
|
|
|
'view functions.') |
|
|
|
'view functions.') |
|
|
|
reqctx = top.copy() |
|
|
|
reqctx = top.copy() |
|
|
|
reqctx.session = session.copy() |
|
|
|
reqctx.session = deepcopy(session) |
|
|
|
def wrapper(*args, **kwargs): |
|
|
|
def wrapper(*args, **kwargs): |
|
|
|
with reqctx: |
|
|
|
with reqctx: |
|
|
|
return f(*args, **kwargs) |
|
|
|
return f(*args, **kwargs) |
|
|
|