fix [pypi] badges when package has null license (#7761)

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
chris48s
2022-03-25 18:44:47 +00:00
committed by GitHub
parent e60f359c8f
commit eb0ee6a9a1
2 changed files with 8 additions and 1 deletions

View File

@@ -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()

View File

@@ -104,6 +104,12 @@ describe('PyPI helpers', function () {
'MIT',
])
forCases([
given({
info: {
license: null,
classifiers: ['License :: OSI Approved :: MIT License'],
},
}),
given({
info: {
license: '',