Do not check compatibiliy while upgrading

This commit is contained in:
Raphael Michel
2019-12-13 12:55:33 +01:00
parent e67ff83378
commit 282ad2c869
2 changed files with 4 additions and 1 deletions

View File

@@ -44,13 +44,14 @@ def get_all_plugins(event=None) -> List[type]:
class PluginConfig(AppConfig):
IGNORE = False
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if not hasattr(self, 'PretixPluginMeta'):
raise ImproperlyConfigured("A pretix plugin config should have a PretixPluginMeta inner class.")
if hasattr(self.PretixPluginMeta, 'compatibility'):
if hasattr(self.PretixPluginMeta, 'compatibility') and not self.IGNORE:
import pkg_resources
try:
pkg_resources.require(self.PretixPluginMeta.compatibility)