diff options
author | Timotej Lazar <timotej.lazar@araneo.org> | 2015-04-30 15:00:48 +0200 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-08-11 14:26:03 +0200 |
commit | da61566394f12d1a32b6f5b0e83637abd311c237 (patch) | |
tree | 3b59609031ab38e0058c0b37c628368b6c2e120f | |
parent | 1c7369e1ca3f9cc8db5bc4090bdb7ce15e473450 (diff) |
Do not look for edits in problems with no traces
-rw-r--r-- | monkey/edits.py | 3 |
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')) |