Skip to content

Commit 993119c

Browse files
committed
✅ Github ID Type Check if else statement.
1 parent 0053e2c commit 993119c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

server/githubsrm/apis/utils.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,12 @@ def verify_github_details(verify_user=False, **kwargs):
4545
if verify_user:
4646
response = session.get(f"{github_api}/users/{kwargs['user_id']}")
4747
res = response.json()
48-
if(res['type']=="User" and response.status_code == 200):
49-
return response.status_code == 200
50-
elif(res['type']!="User" and response.status_code == 200):
48+
if(response.status_code == 200):
49+
if(res['type']=="User" ):
50+
return True
51+
else:
52+
return False
53+
else:
5154
return False
5255
else:
5356
# Todo: move to github apis after discussion on porting

0 commit comments

Comments
 (0)