Skip to content

Commit a743ff5

Browse files
authored
Doug/fix missing repo field (#26)
* Fix for making some repo fields optional to reduce chance of failure if they go missing * Bumped version for deploy
1 parent 0f3394e commit a743ff5

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Diff for: socketdev/repos/__init__.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ def to_dict(self):
3030
def from_dict(cls, data: dict) -> "RepositoryInfo":
3131
return cls(
3232
id=data["id"],
33-
created_at=data["created_at"],
34-
updated_at=data["updated_at"],
35-
head_full_scan_id=data["head_full_scan_id"],
33+
created_at=data.get("created_at", ""),
34+
updated_at=data.get("updated_at", ""),
35+
head_full_scan_id=data.get("head_full_scan_id", ""),
3636
name=data["name"],
37-
description=data["description"],
38-
homepage=data["homepage"],
39-
visibility=data["visibility"],
40-
archived=data["archived"],
41-
default_branch=data["default_branch"],
42-
slug=data.get("slug"),
37+
description=data.get("description", ""),
38+
homepage=data.get("homepage", ""),
39+
visibility=data.get("visibility", "private"),
40+
archived=data.get("archived", False),
41+
default_branch=data.get("default_branch", "main"),
42+
slug=data["slug"]
4343
)
4444

4545

Diff for: socketdev/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.0.9"
1+
__version__ = "2.0.10"

0 commit comments

Comments
 (0)