forked from CGM_Public/pretix_original
Make plugin dependencies optional by allowing plugins to report errors
This commit is contained in:
@@ -20,5 +20,6 @@ def get_all_plugins() -> "List[class]":
|
||||
if hasattr(app, 'PretixPluginMeta'):
|
||||
meta = app.PretixPluginMeta
|
||||
meta.module = app.name
|
||||
meta.app = app
|
||||
plugins.append(meta)
|
||||
return plugins
|
||||
|
||||
@@ -39,8 +39,9 @@ class EventPluginSignal(django.dispatch.Signal):
|
||||
|
||||
# Only fire receivers from active plugins
|
||||
if app.name in sender.get_plugins():
|
||||
response = receiver(signal=self, sender=sender, **named)
|
||||
responses.append((receiver, response))
|
||||
if not hasattr(app, 'compatibility_errors') or not app.compatibility_errors:
|
||||
response = receiver(signal=self, sender=sender, **named)
|
||||
responses.append((receiver, response))
|
||||
return responses
|
||||
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user