mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Moved CORE_MODULES to a setting
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
import pretix.base.i18n
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import django.dispatch
|
||||
from django.apps import apps
|
||||
from django.conf import settings
|
||||
from django.dispatch.dispatcher import NO_RECEIVERS
|
||||
from typing import Any, Callable, List, Tuple
|
||||
|
||||
from .models import Event
|
||||
|
||||
CORE_MODULES = {("pretix", "base"), ("pretix", "presale"), ("pretix", "control")}
|
||||
|
||||
|
||||
class EventPluginSignal(django.dispatch.Signal):
|
||||
"""
|
||||
@@ -42,7 +41,7 @@ class EventPluginSignal(django.dispatch.Signal):
|
||||
searchpath, mod = searchpath.rsplit(".", 1)
|
||||
|
||||
# Only fire receivers from active plugins and core modules
|
||||
if (searchpath, mod) in CORE_MODULES or (app and app.name in sender.get_plugins()):
|
||||
if (searchpath, mod) in settings.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