From 901643b3736333a92baefaf029aae28c237c5aab Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 27 Feb 2015 16:03:51 +0100 Subject: Exclude admin and test users when analyzing traces --- monkey/edits.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'monkey/edits.py') diff --git a/monkey/edits.py b/monkey/edits.py index e522964..8b8c3c3 100644 --- a/monkey/edits.py +++ b/monkey/edits.py @@ -243,7 +243,10 @@ if __name__ == '__main__': for problem in Problem.objects.all(): print(problem.name) pid = problem.pk - traces = [a.trace for a in Attempt.objects.filter(problem=problem, done=True)] + attempts = Attempt.objects.filter(problem=problem, done=True) \ + .exclude(user__username='admin') \ + .exclude(user__username='test') + traces = [a.trace for a in attempts] edits[pid], submissions[pid], queries[pid] = get_edits_from_traces(traces) pickle.dump((edits, submissions, queries), open('edits.pickle', 'wb')) -- cgit v1.2.1