Skip to content

Commit 89eaf41

Browse files
committed
Merge branch 'main' of github.com:SocketDev/socket-sdk-python into scan-type
2 parents 9e99f8f + e7d1c4a commit 89eaf41

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
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.27"
7+
version = "3.0.29"
88
requires-python = ">= 3.9"
99
dependencies = [
1010
'requests',

socketdev/fullscans/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,14 @@ def post(
798798
org_slug = str(params.org_slug)
799799
params_dict = params.to_dict()
800800
params_dict.pop("org_slug")
801+
# Remove pull_request param if it's None, 0, or not an integer
802+
if hasattr(params, 'pull_request') and (
803+
params.pull_request is None or
804+
not isinstance(params.pull_request, int) or
805+
params.pull_request == 0
806+
):
807+
print("Removing pull_request param from FullScanParams as it is None, 0, or not an integer")
808+
params_dict.pop("pull_request")
801809
params_arg = urllib.parse.urlencode(params_dict)
802810
path = "orgs/" + org_slug + "/full-scans?" + str(params_arg)
803811

@@ -1079,4 +1087,4 @@ def get_tar_files(self, org_slug: str, full_scan_id: str) -> bytes:
10791087

10801088
error_message = response.json().get("error", {}).get("message", "Unknown error") if response.text else "Unknown error"
10811089
log.error(f"Error downloading tar files: {response.status_code}, message: {error_message}")
1082-
return b""
1090+
return b""

socketdev/version.py

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

0 commit comments

Comments
 (0)