diff --git a/src/pretix/base/signals.py b/src/pretix/base/signals.py index 6486087f7..b6a0bb471 100644 --- a/src/pretix/base/signals.py +++ b/src/pretix/base/signals.py @@ -45,15 +45,17 @@ class EventPluginSignal(django.dispatch.Signal): for receiver in self._live_receivers(sender): # Find the Django application this belongs to searchpath = receiver.__module__ - mod = None - while True: - app = app_cache.get(searchpath) - if "." not in searchpath or app: - break - searchpath, mod = searchpath.rsplit(".", 1) + core_module = any([searchpath.startswith(cm) for cm in settings.CORE_MODULES]) + app = None + if not core_module: + while True: + app = app_cache.get(searchpath) + if "." not in searchpath or app: + break + searchpath, _ = searchpath.rsplit(".", 1) # Only fire receivers from active plugins and core modules - if (searchpath, mod) in settings.CORE_MODULES or (sender and app and app.name in sender.get_plugins()): + if core_module or (sender and app and app.name in sender.get_plugins()): if not hasattr(app, 'compatibility_errors') or not app.compatibility_errors: response = receiver(signal=self, sender=sender, **named) responses.append((receiver, response)) diff --git a/src/pretix/settings.py b/src/pretix/settings.py index de24f22bc..1f7ff42de 100644 --- a/src/pretix/settings.py +++ b/src/pretix/settings.py @@ -257,9 +257,9 @@ REST_FRAMEWORK = { CORE_MODULES = { - ("pretix", "base"), - ("pretix", "presale"), - ("pretix", "control") + "pretix.base", + "pretix.presale", + "pretix.control" } MIDDLEWARE = [