Skip to content

Commit 1c406e7

Browse files
authored
Merge pull request #165 from jasongrout/typeerror
Handle a mergedBy NaN value
2 parents f15ed08 + 823bf88 commit 1c406e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

github_activity/github_activity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ def filter_ignored(userlist):
550550
item_contributors.add(committer)
551551
# Only add merger if they're not a bot and not the author
552552
if (
553-
row.mergedBy
553+
pd.notna(row.mergedBy)
554554
and row.mergedBy != row.author
555555
and not ignored_user(row.mergedBy)
556556
):

github_activity/graphql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def is_bot(user_dict):
323323

324324
# Add some extra fields
325325
def get_login(user):
326-
return user["login"] if not pd.isna(user) else user
326+
return user["login"] if pd.notna(user) else user
327327

328328
self.data["author"] = self.data["author"].map(get_login)
329329
self.data["mergedBy"] = self.data["mergedBy"].map(get_login)

0 commit comments

Comments
 (0)