Try to fix postgres/mysql test suite error

This commit is contained in:
Griatch 2022-01-16 17:07:45 +01:00
parent 7a2cf7e13d
commit 00a4e5934b
2 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,7 @@ objects already existing in the database.
"""
from django.db.utils import OperationalError
from django.db.utils import OperationalError, ProgrammingError
from django.contrib.contenttypes.models import ContentType
# limit symbol import from API
@ -38,7 +38,7 @@ try:
ChannelDB = ContentType.objects.get(app_label="comms", model="channeldb").model_class()
HelpEntry = ContentType.objects.get(app_label="help", model="helpentry").model_class()
Tag = ContentType.objects.get(app_label="typeclasses", model="tag").model_class()
except OperationalError:
except (OperationalError, ProgrammingError):
# this is a fallback used during tests/doc building
print("Couldn't initialize create managers - db not set up.")
from evennia.objects.models import ObjectDB

View file

@ -26,7 +26,7 @@ Example: To reach the search method 'get_object_with_account'
# Import the manager methods to be wrapped
from django.db.utils import OperationalError
from django.db.utils import OperationalError, ProgrammingError
from django.contrib.contenttypes.models import ContentType
# limit symbol import from API
@ -53,7 +53,7 @@ try:
ChannelDB = ContentType.objects.get(app_label="comms", model="channeldb").model_class()
HelpEntry = ContentType.objects.get(app_label="help", model="helpentry").model_class()
Tag = ContentType.objects.get(app_label="typeclasses", model="tag").model_class()
except OperationalError:
except (OperationalError, ProgrammingError):
# this is a fallback used during tests/doc building
print("Couldn't initialize search managers - db not set up.")
from evennia.objects.models import ObjectDB