From da61566394f12d1a32b6f5b0e83637abd311c237 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 30 Apr 2015 15:00:48 +0200 Subject: Do not look for edits in problems with no traces --- monkey/edits.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'monkey') 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')) -- cgit v1.2.1