Skip to content

Commit 06b729a

Browse files
committed
wip
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 6e64c3a commit 06b729a

33 files changed

+4
-35
lines changed

cyclonedx_py/_internal/utils/cdx.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,10 @@ def licenses_fixup(component: 'Component') -> None:
113113
return
114114
component.licenses = (lexp,)
115115
licenses.remove(lexp)
116-
if component.evidence is None:
117-
component.evidence = ComponentEvidence()
118-
component.evidence.licenses.update(licenses)
116+
if len(licenses) > 0:
117+
if component.evidence is None:
118+
component.evidence = ComponentEvidence()
119+
component.evidence.licenses.update(licenses)
119120

120121

121122
_MAP_KNOWN_URL_LABELS: dict[str, ExternalReferenceType] = {

tests/_data/snapshots/environment/pep639-texts_with-license-pep639_1.3.json.bin

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/snapshots/environment/pep639-texts_with-license-pep639_1.3.xml.bin

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/snapshots/environment/pep639-texts_with-license-pep639_1.4.json.bin

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/snapshots/environment/pep639-texts_with-license-pep639_1.4.xml.bin

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/snapshots/environment/pep639-texts_with-license-pep639_1.5.json.bin

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/snapshots/environment/pep639-texts_with-license-pep639_1.5.xml.bin

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/snapshots/environment/pep639-texts_with-license-pep639_1.6.json.bin

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/snapshots/environment/pep639-texts_with-license-pep639_1.6.xml.bin

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/snapshots/environment/pep639_with-license-pep639_1.3.json.bin

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)