forked from CGM_Public/pretix_original
Do not require new plugins to sett default=True on their AppConfig
This commit is contained in:
@@ -65,7 +65,14 @@ def get_all_plugins(event=None) -> List[type]:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class PluginConfig(AppConfig):
|
class PluginConfigMeta(type):
|
||||||
|
def __getattribute__(cls, item):
|
||||||
|
if item == "default" and cls is PluginConfig:
|
||||||
|
return False
|
||||||
|
return super().__getattribute__(item)
|
||||||
|
|
||||||
|
|
||||||
|
class PluginConfig(AppConfig, metaclass=PluginConfigMeta):
|
||||||
IGNORE = False
|
IGNORE = False
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user