Abhishek Thakur
commited on
Commit
·
695a2f7
1
Parent(s):
6923acf
fix org
Browse files- competitions/utils.py +2 -2
competitions/utils.py
CHANGED
@@ -48,7 +48,7 @@ def user_authentication(token):
|
|
48 |
|
49 |
user_info["id"] = resp["id"]
|
50 |
user_info["name"] = resp["name"]
|
51 |
-
user_info["orgs"] = resp["orgs"]
|
52 |
return user_info
|
53 |
|
54 |
|
@@ -228,7 +228,7 @@ def can_user_submit_before_start(user_token, competition_organization):
|
|
228 |
user_info = user_authentication(token=user_token)
|
229 |
user_orgs = user_info.get("orgs", [])
|
230 |
for org in user_orgs:
|
231 |
-
if org
|
232 |
return True
|
233 |
return False
|
234 |
|
|
|
48 |
|
49 |
user_info["id"] = resp["id"]
|
50 |
user_info["name"] = resp["name"]
|
51 |
+
user_info["orgs"] = [resp["orgs"][k]["name"] for k in range(len(resp["orgs"]))]
|
52 |
return user_info
|
53 |
|
54 |
|
|
|
228 |
user_info = user_authentication(token=user_token)
|
229 |
user_orgs = user_info.get("orgs", [])
|
230 |
for org in user_orgs:
|
231 |
+
if org == competition_organization:
|
232 |
return True
|
233 |
return False
|
234 |
|