Skip to content

Commit

Permalink
fix(repo): handle repo["owner"] == None
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner authored and sigmavirus24 committed Dec 15, 2023
1 parent 6d15a77 commit 69414a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/github3/repos/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def _update_attributes(self, repo):
self.milestones_urlt = urit.URITemplate(repo["milestones_url"])
self.name = repo["name"]
self.notifications_urlt = urit.URITemplate(repo["notifications_url"])
self.owner = users.ShortUser(repo["owner"], self)
self.owner = repo["owner"]
if self.owner:
self.owner = users.ShortUser(self.owner, self)
self.private = repo["private"]
self.pulls_urlt = urit.URITemplate(repo["pulls_url"])
self.releases_urlt = urit.URITemplate(repo["releases_url"])
Expand Down

0 comments on commit 69414a0

Please sign in to comment.