We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9acb37 commit 42e208aCopy full SHA for 42e208a
1 file changed
vulnerabilities/importer.py
@@ -268,9 +268,13 @@ def from_dict(cls, affected_pkg: dict):
268
return
269
270
fixed_version = affected_pkg["fixed_version"]
271
- if fixed_version and affected_version_range:
272
- # TODO: revisit after https://github.com/nexB/univers/issues/10
273
- fixed_version = affected_version_range.version_class(fixed_version)
+ if fixed_version:
+ if affected_version_range:
+ # TODO: revisit after https://github.com/nexB/univers/issues/10
274
+ fixed_version = affected_version_range.version_class(fixed_version)
275
+ elif package.type in RANGE_CLASS_BY_SCHEMES:
276
+ vrc = RANGE_CLASS_BY_SCHEMES[package.type]
277
+ fixed_version = vrc.version_class(fixed_version)
278
279
if not fixed_version and not affected_version_range:
280
logger.error(
0 commit comments