From cf898b3c334b3e6f20ed2f3ef336d3f8ec67a354 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 28 Jul 2016 20:38:41 +0200 Subject: [PATCH] EventPluginSignal: Fixed a problem with plugins that live in a top-level package --- src/pretix/base/signals.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pretix/base/signals.py b/src/pretix/base/signals.py index 58e4908bee..5d3478d805 100644 --- a/src/pretix/base/signals.py +++ b/src/pretix/base/signals.py @@ -32,12 +32,14 @@ class EventPluginSignal(django.dispatch.Signal): searchpath = receiver.__module__ app = None mod = None - while "." in searchpath: + while True: try: if apps.is_installed(searchpath): app = apps.get_app_config(searchpath.split(".")[-1]) except LookupError: pass + if "." not in searchpath: + break searchpath, mod = searchpath.rsplit(".", 1) # Only fire receivers from active plugins and core modules