From b2c8cc5ac37ca7227e6853d3bbf0e31e447cbc35 Mon Sep 17 00:00:00 2001 From: andreymal Date: Thu, 31 Aug 2023 23:39:51 +0300 Subject: [PATCH] Clear after_request_callbacks after calling --- mini_fiction/utils/misc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mini_fiction/utils/misc.py b/mini_fiction/utils/misc.py index 0c015a77..a548a85e 100644 --- a/mini_fiction/utils/misc.py +++ b/mini_fiction/utils/misc.py @@ -767,3 +767,4 @@ def make_absolute_url(url: str) -> str: def call_after_request_callbacks() -> None: for f, args, kwargs in getattr(g, "after_request_callbacks", ()): f(*args, **kwargs) + g.after_request_callbacks = []