2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-02 13:28:49 +00:00

switch print with assert

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

View File

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