Skip to content

Commit

Permalink
fixed handling undefined licenseIDs
Browse files Browse the repository at this point in the history
Signed-off-by: Jacek Puchta <[email protected]>
  • Loading branch information
puchta committed Oct 25, 2023
1 parent ef171d9 commit c252221
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2449,11 +2449,14 @@ export const getPyMetadata = async function (pkgList, fetchDepsInfo) {
if (c.startsWith("License :: ")) {
let licenseName = c.split(" :: ")[c.split(" :: ").length - 1];
let licenseId = findLicenseId(licenseName);
if (!p.license.includes(licenseId)) p.license.push(licenseId);
if (licenseId && !p.license.includes(licenseId)) p.license.push(licenseId);
}
}
}
if (body.info.license) p.license.push(findLicenseId(body.info.license));
if (body.info.license) {
let licenseId = findLicenseId(licenseName);
if (licenseId && !p.license.includes(licenseId)) p.license.push(licenseId);
}
if (body.info.home_page) {
if (body.info.home_page.includes("git")) {
p.repository = { url: body.info.home_page };
Expand Down

0 comments on commit c252221

Please sign in to comment.