mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Handle exception when creating default labels (#5163)
* Handle exception when creating default labels - Running workers in parallel may cause race conditions - Catch any exception which is raised * Prevent password from being logged * Update default timeout for docker
This commit is contained in:
		| @@ -182,13 +182,15 @@ class LabelConfig(AppConfig): | ||||
|  | ||||
|         logger.info(f"Creating entry for {model} '{label['name']}'") | ||||
|  | ||||
|         model.objects.create( | ||||
|             name=label['name'], | ||||
|             description=label['description'], | ||||
|             label=filename, | ||||
|             filters='', | ||||
|             enabled=True, | ||||
|             width=label['width'], | ||||
|             height=label['height'], | ||||
|         ) | ||||
|         return | ||||
|         try: | ||||
|             model.objects.create( | ||||
|                 name=label['name'], | ||||
|                 description=label['description'], | ||||
|                 label=filename, | ||||
|                 filters='', | ||||
|                 enabled=True, | ||||
|                 width=label['width'], | ||||
|                 height=label['height'], | ||||
|             ) | ||||
|         except Exception: | ||||
|             logger.warning(f"Failed to create label '{label['name']}'") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user