From eeb2f0ca73d3fb2aec4914f182bb25c0eadbbbb9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Tue, 12 Nov 2013 13:03:24 +0100 Subject: [PATCH 1/1] Generate submission from latest contact --- wtem/management/commands/wtem_generate_keys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wtem/management/commands/wtem_generate_keys.py b/wtem/management/commands/wtem_generate_keys.py index 0fc537b..8a14ff9 100644 --- a/wtem/management/commands/wtem_generate_keys.py +++ b/wtem/management/commands/wtem_generate_keys.py @@ -10,7 +10,7 @@ class Command(BaseCommand): new = 0 skipped = 0 - for wtem_contact in Contact.objects.filter(form_tag = 'wtem'): + for wtem_contact in Contact.objects.filter(form_tag = 'wtem').order_by('-created_at'): for student in wtem_contact.body['student']: if not Submission.objects.filter(email = student['email']).exists(): args = dict() -- 2.20.1