mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	catch more explicit
This commit is contained in:
		| @@ -5,6 +5,7 @@ import hashlib | |||||||
|  |  | ||||||
| from django.apps import AppConfig | from django.apps import AppConfig | ||||||
| from django.conf import settings | from django.conf import settings | ||||||
|  | from django.core.exceptions import AppRegistryNotReady | ||||||
|  |  | ||||||
| from InvenTree.ready import canAppAccessDatabase | from InvenTree.ready import canAppAccessDatabase | ||||||
|  |  | ||||||
| @@ -53,7 +54,7 @@ class LabelConfig(AppConfig): | |||||||
|  |  | ||||||
|         try: |         try: | ||||||
|             from .models import StockItemLabel |             from .models import StockItemLabel | ||||||
|         except: |         except AppRegistryNotReady:  # pragma: no cover | ||||||
|             # Database might not by ready yet |             # Database might not by ready yet | ||||||
|             return |             return | ||||||
|  |  | ||||||
| @@ -140,7 +141,7 @@ class LabelConfig(AppConfig): | |||||||
|  |  | ||||||
|         try: |         try: | ||||||
|             from .models import StockLocationLabel |             from .models import StockLocationLabel | ||||||
|         except: |         except AppRegistryNotReady:  # pragma: no cover | ||||||
|             # Database might not yet be ready |             # Database might not yet be ready | ||||||
|             return |             return | ||||||
|  |  | ||||||
| @@ -234,7 +235,7 @@ class LabelConfig(AppConfig): | |||||||
|  |  | ||||||
|         try: |         try: | ||||||
|             from .models import PartLabel |             from .models import PartLabel | ||||||
|         except: |         except AppRegistryNotReady:  # pragma: no cover | ||||||
|             # Database might not yet be ready |             # Database might not yet be ready | ||||||
|             return |             return | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user