forked from orbit-oss/flask
allow async signal receivers
This commit is contained in:
parent
a05c0c6b72
commit
8239765a44
5 changed files with 25 additions and 12 deletions
|
|
@ -327,8 +327,10 @@ def flash(message: str, category: str = "message") -> None:
|
|||
flashes = session.get("_flashes", [])
|
||||
flashes.append((category, message))
|
||||
session["_flashes"] = flashes
|
||||
app = current_app._get_current_object() # type: ignore
|
||||
message_flashed.send(
|
||||
current_app._get_current_object(), # type: ignore
|
||||
app,
|
||||
_async_wrapper=app.ensure_sync,
|
||||
message=message,
|
||||
category=category,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue