server: fix importing part

This commit is contained in:
King Kévin 2023-02-02 06:54:58 +01:00
parent 5fc71e50db
commit efeaebce59
1 changed files with 1 additions and 1 deletions

View File

@ -431,7 +431,7 @@ get '/import/lcsc/:lcsc' do
part["details"] = result["productIntroEn"]
part["manufacturer"] = result["brandNameEn"]
part["package"] = result["encapStandard"]
part["distributors"] = {"LCSC" => result["productCode"]}
part["distributors"] = [{"name" => "LCSC", "sku" => result["productCode"]}]
part["attachments"] = result["productImages"]
part["datasheet"] = result["pdfUrl"]
existing = get_part_by_name(part["name"])