diff --git a/services/pypi/pypi-base.js b/services/pypi/pypi-base.js index e19d6e23a5..a25ed787b4 100644 --- a/services/pypi/pypi-base.js +++ b/services/pypi/pypi-base.js @@ -5,7 +5,8 @@ const schema = Joi.object({ info: Joi.object({ version: Joi.string().required(), // https://github.com/badges/shields/issues/2022 - license: Joi.string().allow(''), + // https://github.com/badges/shields/issues/7728 + license: Joi.string().allow('').allow(null), classifiers: Joi.array().items(Joi.string()).required(), }).required(), releases: Joi.object() diff --git a/services/pypi/pypi-helpers.spec.js b/services/pypi/pypi-helpers.spec.js index eca6fed39b..bb86c37955 100644 --- a/services/pypi/pypi-helpers.spec.js +++ b/services/pypi/pypi-helpers.spec.js @@ -104,6 +104,12 @@ describe('PyPI helpers', function () { 'MIT', ]) forCases([ + given({ + info: { + license: null, + classifiers: ['License :: OSI Approved :: MIT License'], + }, + }), given({ info: { license: '',