Skip to content

Commit d96a409

Browse files
committed
Fixed diff missing diff_url or report_url
1 parent 04b4420 commit d96a409

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

pyproject.toml

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

77
[project]
88
name = "socketsecurity"
9-
version = "2.1.17"
9+
version = "2.1.18"
1010
requires-python = ">= 3.10"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ requests==2.32.3
5959
# via socketsecurity
6060
smmap==5.0.2
6161
# via gitdb
62-
socket-sdk-python==2.0.15
62+
socket-sdk-python==2.1.5
6363
# via socketsecurity
6464
typing-extensions==4.12.2
6565
# via socket-sdk-python

socketsecurity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.1.17'
2+
__version__ = '2.1.18'

socketsecurity/core/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,13 +667,13 @@ def create_new_diff(
667667
"""
668668
log.debug(f"starting create_new_diff with no_change: {no_change}")
669669
if no_change:
670-
return Diff(id="no_diff_id")
670+
return Diff(id="no_diff_id", diff_url="", report_url="")
671671

672672
# Find manifest files
673673
files = self.find_files(path)
674674
files_for_sending = self.load_files_for_sending(files, path)
675675
if not files:
676-
return Diff(id="no_diff_id")
676+
return Diff(id="no_diff_id", diff_url="", report_url="")
677677

678678
try:
679679
# Get head scan ID
@@ -802,6 +802,10 @@ def create_diff_report(
802802
diff.new_capabilities = Core.get_capabilities_for_added_packages(added_packages)
803803

804804
Core.add_purl_capabilities(diff)
805+
if not hasattr(diff, "diff_url"):
806+
diff.diff_url = None
807+
if not hasattr(diff, "report_url"):
808+
diff.report_url = None
805809

806810
return diff
807811

0 commit comments

Comments
 (0)