Skip to content

Commit e518f11

Browse files
authored
Changed version to be optional so that if it isn't there in a diff or full scan things don't break (#59)
1 parent 5de803f commit e518f11

File tree

4 files changed

+1017
-555
lines changed

4 files changed

+1017
-555
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "socketdev"
7-
version = "3.0.21"
7+
version = "3.0.22"
88
requires-python = ">= 3.9"
99
dependencies = [
1010
'requests',

socketdev/fullscans/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@ class DiffArtifact:
450450
id: str
451451
type: str
452452
name: str
453-
version: str
454453
licenseDetails: List[LicenseDetail]
454+
version: Optional[str] = None
455455
score: Optional[SocketScore] = None
456456
author: List[str] = field(default_factory=list)
457457
alerts: List[SocketAlert] = field(default_factory=list)
@@ -500,7 +500,7 @@ def from_dict(cls, data: dict) -> "DiffArtifact":
500500
type=data["type"],
501501
name=data["name"],
502502
score=score,
503-
version=data["version"],
503+
version=data.get("version"),
504504
alerts=[SocketAlert.from_dict(alert) for alert in data.get("alerts", [])],
505505
licenseDetails=license_details,
506506
files=data.get("files"),

socketdev/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.0.21"
1+
__version__ = "3.0.22"

0 commit comments

Comments
 (0)