projects
/
oweals
/
karmaworld.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72bf022
)
Don't blow up if RequesterAnnotation isn't an integer
author
Charles Connell
<charles@connells.org>
Tue, 13 May 2014 14:37:06 +0000
(10:37 -0400)
committer
Charles Connell
<charles@connells.org>
Tue, 13 May 2014 14:37:06 +0000
(10:37 -0400)
karmaworld/apps/quizzes/tasks.py
patch
|
blob
|
history
diff --git
a/karmaworld/apps/quizzes/tasks.py
b/karmaworld/apps/quizzes/tasks.py
index af6e67765f0684e5048321eeea5808332947d70f..806a4b6325622a2ab9018c899b286dd1b043a1ff 100644
(file)
--- a/
karmaworld/apps/quizzes/tasks.py
+++ b/
karmaworld/apps/quizzes/tasks.py
@@
-128,8
+128,9
@@
def get_extract_keywords_results():
for hit in reviewable_hits:
try:
note_id = connection.get_hit(hit.HITId)[0].RequesterAnnotation
- except AttributeError:
- logger.error('HIT {0} does not have a RequesterAnnotation, '
+ note_id = int(note_id)
+ except (AttributeError, ValueError):
+ logger.error('HIT {0} does not have a valid RequesterAnnotation, '
'so we cannot determine which note it references'.format(hit.HITId))
return