forked from orbit-oss/flask
Fixed stream_with_context if decorated function has parameters
This commit is contained in:
parent
9a80fe691d
commit
cc536c8a7b
2 changed files with 4 additions and 4 deletions
|
|
@ -101,7 +101,7 @@ def stream_with_context(generator_or_function):
|
|||
gen = iter(generator_or_function)
|
||||
except TypeError:
|
||||
def decorator(*args, **kwargs):
|
||||
gen = generator_or_function()
|
||||
gen = generator_or_function(*args, **kwargs)
|
||||
return stream_with_context(gen)
|
||||
return update_wrapper(decorator, generator_or_function)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue