mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-05 06:57:27 +02:00
Fixed Python error when top level assembly is empty.
This commit is contained in:
@@ -77,7 +77,7 @@ def bom_to_assemblies(bom_dir, bounds_map):
|
|||||||
#
|
#
|
||||||
if flat_bom:
|
if flat_bom:
|
||||||
ass = flat_bom[-1]
|
ass = flat_bom[-1]
|
||||||
if len(ass["assemblies"]) < 2 and not ass["vitamins"] and not ass["printed"] and not ass["routed"]:
|
if len(ass["assemblies"]) == 1 and not ass["vitamins"] and not ass["printed"] and not ass["routed"]:
|
||||||
flat_bom = flat_bom[:-1]
|
flat_bom = flat_bom[:-1]
|
||||||
return [assembly["name"] for assembly in flat_bom]
|
return [assembly["name"] for assembly in flat_bom]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user