diff options
author | Palaparthy Adityachandra | 2021-02-11 14:26:19 +0530 |
---|---|---|
committer | GitHub | 2021-02-11 14:26:19 +0530 |
commit | b2bf7b9fef33d59cd1e55776a51577d66a252322 (patch) | |
tree | 0f95bec03075118e5310aba89c2b2ffe7d39b7c9 /yaksh/models.py | |
parent | 546458cd40d847015363f7c085d7f72733036498 (diff) | |
parent | 51039188a191a46afd4e3c499e2a035e3bc1ceba (diff) | |
download | online_test-b2bf7b9fef33d59cd1e55776a51577d66a252322.tar.gz online_test-b2bf7b9fef33d59cd1e55776a51577d66a252322.tar.bz2 online_test-b2bf7b9fef33d59cd1e55776a51577d66a252322.zip |
Merge pull request #818 from adityacp/hot_fix_3
Fix monitor to get all the attempts properly
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 16800fe..11ddf8a 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -2037,8 +2037,11 @@ class AnswerPaperManager(models.Manager): def _get_per_tc_data(answers, q_type): tc = [] for answer in answers["answer"]: - ans = literal_eval(answer) if answer else None - tc.extend(ans) if q_type == "mcc" else tc.append(str(ans)) + try: + ans = literal_eval(answer) if answer else None + tc.extend(ans) if q_type == "mcc" else tc.append(str(ans)) + except Exception: + pass return dict(Counter(tc)) df = pd.DataFrame(answers) if not df.empty: |