summaryrefslogtreecommitdiff
path: root/monkey
diff options
context:
space:
mode:
Diffstat (limited to 'monkey')
-rw-r--r--monkey/edits.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/monkey/edits.py b/monkey/edits.py
index 42e339a..2dcd653 100644
--- a/monkey/edits.py
+++ b/monkey/edits.py
@@ -250,6 +250,7 @@ if __name__ == '__main__':
attempts = Attempt.objects.filter(problem=problem, done=True) \
.exclude(user__groups=None)
traces = [a.trace for a in attempts]
- edits[pid], submissions[pid], queries[pid] = get_edits_from_traces(traces)
+ if traces:
+ edits[pid], submissions[pid], queries[pid] = get_edits_from_traces(traces)
pickle.dump((edits, submissions, queries), open('edits.pickle', 'wb'))