From 84871fdc79142050d99504433735647fcd6cc63e Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 19 May 2022 00:19:14 +0200 Subject: [PATCH] remove tries - if we are here the AppReg should be ready or fail --- InvenTree/label/apps.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/InvenTree/label/apps.py b/InvenTree/label/apps.py index 1a719a9638..e64a708402 100644 --- a/InvenTree/label/apps.py +++ b/InvenTree/label/apps.py @@ -52,11 +52,7 @@ class LabelConfig(AppConfig): if they do not already exist """ - try: - from .models import StockItemLabel - except AppRegistryNotReady: # pragma: no cover - # Database might not by ready yet - return + from .models import StockItemLabel src_dir = os.path.join( os.path.dirname(os.path.realpath(__file__)), @@ -139,11 +135,7 @@ class LabelConfig(AppConfig): if they do not already exist """ - try: - from .models import StockLocationLabel - except AppRegistryNotReady: # pragma: no cover - # Database might not yet be ready - return + from .models import StockLocationLabel src_dir = os.path.join( os.path.dirname(os.path.realpath(__file__)), @@ -233,11 +225,7 @@ class LabelConfig(AppConfig): if they do not already exist. """ - try: - from .models import PartLabel - except AppRegistryNotReady: # pragma: no cover - # Database might not yet be ready - return + from .models import PartLabel src_dir = os.path.join( os.path.dirname(os.path.realpath(__file__)),