Skip to content

Commit 78271a4

Browse files
committed
Merge remote-tracking branch 'origin/pr/466' into develop
2 parents bf6e7e0 + 67f082b commit 78271a4

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

AUTHORS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,5 @@ Contributors
108108
- Matt Chung (@itsmemattchung)
109109

110110
- Martin Ek (@ekmartin)
111+
112+
- Chris Thompson (@notyetsecure)

github3/issues/milestone.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def _update_attributes(self, mile):
2626
self.description = mile.get('description')
2727
#: :class:`User <github3.users.User>` object representing the creator
2828
#: of the milestone.
29-
self.creator = User(mile.get('creator'), self)
29+
self.creator = None
30+
if mile.get('creator'):
31+
self.creator = User(mile.get('creator'), self)
3032
#: Number of issues associated with this milestone which are still
3133
#: open.
3234
self.open_issues = mile.get('open_issues')

tests/test_issues.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ def test_update(self):
121121
'2013-12-31T23:59:59Z')
122122
self.mock_assertions()
123123

124+
def test_issue_465(self):
125+
json = self.m.as_dict().copy()
126+
json['creator'] = None
127+
m = Milestone(json)
128+
assert m.creator is None
129+
124130

125131
class TestIssue(BaseCase):
126132
def __init__(self, methodName='runTest'):

0 commit comments

Comments
 (0)