Yichong Lu
commited on
Commit
·
fcc6e41
1
Parent(s):
f6c051b
debug
Browse files- competitions/app.py +1 -1
- competitions/utils.py +4 -1
competitions/app.py
CHANGED
@@ -332,7 +332,7 @@ def new_submission(
|
|
332 |
if team_id not in team_file_api.get_team_white_list():
|
333 |
return {"response": "You are not allowed to make submissions."}
|
334 |
|
335 |
-
|
336 |
|
337 |
lock = FileLock(f"./submission_lock/{team_id}.lock", blocking=False)
|
338 |
try:
|
|
|
332 |
if team_id not in team_file_api.get_team_white_list():
|
333 |
return {"response": "You are not allowed to make submissions."}
|
334 |
|
335 |
+
team_submission_limit_dict = team_file_api.get_team_submission_limit(user_token)
|
336 |
|
337 |
lock = FileLock(f"./submission_lock/{team_id}.lock", blocking=False)
|
338 |
try:
|
competitions/utils.py
CHANGED
@@ -418,7 +418,10 @@ class TeamFileApi:
|
|
418 |
)
|
419 |
|
420 |
with open(file, "r", encoding="utf-8") as f:
|
421 |
-
|
|
|
|
|
|
|
422 |
return team_submission_limit
|
423 |
|
424 |
|
|
|
418 |
)
|
419 |
|
420 |
with open(file, "r", encoding="utf-8") as f:
|
421 |
+
try:
|
422 |
+
team_submission_limit = json.load(f)
|
423 |
+
except json.decoder.JSONDecodeError as e:
|
424 |
+
print(f"Error decoding JSON: {e}")
|
425 |
return team_submission_limit
|
426 |
|
427 |
|