fixing #3987 - postgreSQL migration possible again

This commit is contained in:
Jochen Saalfeld 2018-11-06 12:29:02 +01:00
parent 3fde4dc81f
commit 87dbf90922
No known key found for this signature in database
GPG Key ID: 8ACD4E8264B67DF4

View File

@ -6,7 +6,7 @@ from django.apps import AppConfig
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models.signals import post_migrate
from django.db.utils import OperationalError
from django.db.utils import OperationalError, ProgrammingError
from ..utils.projector import register_projector_elements
@ -53,7 +53,7 @@ class CoreAppConfig(AppConfig):
# Set constants
try:
set_constants(get_constants_from_apps())
except (ImproperlyConfigured, OperationalError):
except (ImproperlyConfigured, OperationalError, ProgrammingError):
# Database is not loaded. This happens in tests and migrations.
pass
@ -81,7 +81,7 @@ class CoreAppConfig(AppConfig):
# Sets the cache
try:
element_cache.ensure_cache()
except (ImproperlyConfigured, OperationalError):
except (ImproperlyConfigured, OperationalError, ProgrammingError):
# This happens in the tests or in migrations. Do nothing
pass