From 9dc0f60445c3a2adbcc851a2b59e85d0932fce77 Mon Sep 17 00:00:00 2001 From: Hugo Gomes Date: Thu, 6 Jun 2024 02:40:06 +0100 Subject: [PATCH] fix: unbind on unload --- src/appier_extras/parts/preflight/part.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appier_extras/parts/preflight/part.py b/src/appier_extras/parts/preflight/part.py index 6440843f..13a9a5b6 100644 --- a/src/appier_extras/parts/preflight/part.py +++ b/src/appier_extras/parts/preflight/part.py @@ -52,7 +52,7 @@ def load(self): def unload(self): appier.Part.unload(self) - self.owner.bind("before_request", self._handler) + self.owner.unbind("before_request", self._handler) def _handler(self): if not self.owner.request.method == "OPTIONS":