From efeaebce59beb0fdb108c6f2cab3702b2348747a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Thu, 2 Feb 2023 06:54:58 +0100 Subject: [PATCH] server: fix importing part --- server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.rb b/server.rb index 1506e34..445b4af 100755 --- a/server.rb +++ b/server.rb @@ -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"])