forked from CGM_Public/pretix_original
Event dashboard with a flat design and plugin hooks
This commit is contained in:
@@ -5,6 +5,8 @@ from typing import Any, Callable, List, Tuple
|
||||
|
||||
from .models import Event
|
||||
|
||||
CORE_MODULES = {("pretix", "base"), ("pretix", "presale"), ("pretix", "control")}
|
||||
|
||||
|
||||
class EventPluginSignal(django.dispatch.Signal):
|
||||
"""
|
||||
@@ -40,7 +42,7 @@ class EventPluginSignal(django.dispatch.Signal):
|
||||
searchpath, mod = searchpath.rsplit(".", 1)
|
||||
|
||||
# Only fire receivers from active plugins and core modules
|
||||
if (searchpath, mod) == ("pretix", "base") or (app and app.name in sender.get_plugins()):
|
||||
if (searchpath, mod) in CORE_MODULES or (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))
|
||||
|
||||
Reference in New Issue
Block a user