[3D download] Fixed cases where we have no components from the SCH

This commit is contained in:
Salvador E. Tropea 2023-01-31 13:31:59 -03:00
parent df085fa8bc
commit 624f7ff68f
1 changed files with 2 additions and 0 deletions

View File

@ -187,6 +187,8 @@ class Base3DOptions(VariantOptions):
if all_comps is None and GS.sch_file:
GS.load_sch()
all_comps = GS.sch.get_components()
if all_comps is None:
all_comps = []
all_comps_hash = {c.ref: c for c in all_comps}
# Find the LCSC field
lcsc_field = self.solve_field_name('_field_lcsc_part', empty_when_none=True)