Update apps.py

This commit is contained in:
Matthias Mair 2022-05-20 08:31:21 +02:00 committed by GitHub
parent c98cae8c1f
commit 63c64f9dff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,8 +46,7 @@ class LabelConfig(AppConfig):
# Test if models are ready
try:
from .models import StockLocationLabel
obj = StockLocationLabel.objects.first()
assert bool(obj is not None)
assert bool(StockLocationLabel is not None)
except AppRegistryNotReady:
# Database might not yet be ready
warnings.warn('Database was not ready for creating labels')