mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-06 15:36:30 +02:00
Added a guard against and empty BOM in views.py.
This commit is contained in:
@@ -71,6 +71,7 @@ def bom_to_assemblies(bom_dir, bounds_map):
|
||||
#
|
||||
# Remove the main assembly if it is a shell
|
||||
#
|
||||
if flat_bom:
|
||||
ass = flat_bom[-1]
|
||||
if len(ass["assemblies"]) < 2 and not ass["vitamins"] and not ass["printed"] and not ass["routed"]:
|
||||
flat_bom = flat_bom[:-1]
|
||||
|
Reference in New Issue
Block a user