Skip to content
Snippets Groups Projects
Verified Commit 9fccf8f3 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Ignore errors in app.ready()

parent ae28154b
No related branches found
No related tags found
No related merge requests found
from django.apps import apps from django.apps import apps
from django.db import OperationalError
from aleksis.core.util.apps import AppConfig from aleksis.core.util.apps import AppConfig
from aleksis.core.util.core_helpers import get_site_preferences from aleksis.core.util.core_helpers import get_site_preferences
...@@ -25,7 +26,11 @@ class DefaultConfig(AppConfig): ...@@ -25,7 +26,11 @@ class DefaultConfig(AppConfig):
for app_config in apps.app_configs.values(): for app_config in apps.app_configs.values():
if hasattr(app_config, "get_payment_variants"): if hasattr(app_config, "get_payment_variants"):
variants = app_config.get_payment_variants() try:
variants = app_config.get_payment_variants()
except OperationalError:
# Non-fatal, database is not yet ready
continue
for name, config in variants.items(): for name, config in variants.items():
if name not in settings.PAYMENT_VARIANTS: if name not in settings.PAYMENT_VARIANTS:
settings.PAYMENT_VARIANTS[name] = config settings.PAYMENT_VARIANTS[name] = config
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment