catch more explicit

This commit is contained in:
Matthias 2022-02-13 22:06:53 +01:00
parent 8f06f5099c
commit 40ea93e00a
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -5,6 +5,7 @@ import hashlib
from django.apps import AppConfig
from django.conf import settings
from django.core.exceptions import AppRegistryNotReady
from InvenTree.ready import canAppAccessDatabase
@ -53,7 +54,7 @@ class LabelConfig(AppConfig):
try:
from .models import StockItemLabel
except:
except AppRegistryNotReady: # pragma: no cover
# Database might not by ready yet
return
@ -140,7 +141,7 @@ class LabelConfig(AppConfig):
try:
from .models import StockLocationLabel
except:
except AppRegistryNotReady: # pragma: no cover
# Database might not yet be ready
return
@ -234,7 +235,7 @@ class LabelConfig(AppConfig):
try:
from .models import PartLabel
except:
except AppRegistryNotReady: # pragma: no cover
# Database might not yet be ready
return