8000 Actual fix re the last commit · dahlia/github3.py@e864618 · GitHub
[go: up one dir, main page]

Skip to content

Commit e864618

Browse files
committed
Actual fix re the last commit
1 parent e3f3b53 commit e864618

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

github3/repos/repo.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,8 @@ def create_comment(self, body, sha, path=None, position=None, line=1):
299299
default: 1
300300
:returns: :class:`RepoComment <RepoComment>` if successful else None
301301
"""
302-
line = int(line)
303-
position = int(position)
304302
json = None
305-
if body and sha and line > 0:
303+
if body and sha and (line and int(line) > 0):
306304
data = {'body': body, 'commit_id': sha, 'line': line,
307305
'path': path, 'position': position}
308306
self._remove_none(data)

0 commit comments

Comments
 (0)
0