Skip to content

Commit

Permalink
Only select social accounts from github to get the github id.
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner committed Sep 19, 2023
1 parent 6a374ca commit ac9f048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion galaxy/api/serializers/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def get_summary_fields(self, obj):
return d

def get_github_id(self, obj):
social_user = SocialAccount.objects.filter(user_id=obj.id).first()
social_user = SocialAccount.objects.filter(user_id=obj.id, provider='github').first()
if social_user is None:
return None
return social_user.extra_data.get('id')

0 comments on commit ac9f048

Please sign in to comment.