From b90074f89b5d3e238f04a19d4a42d52ce2004d54 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 30 Jun 2011 20:32:19 +0100 Subject: [PATCH] Ignore non-submitted applications --- app/hr/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/hr/forms.py b/app/hr/forms.py index dff0c68..53e5899 100644 --- a/app/hr/forms.py +++ b/app/hr/forms.py @@ -39,7 +39,7 @@ def CreateApplicationForm(user): if not 'character' in self.cleaned_data or not self.cleaned_data['character']: raise forms.ValidationError("Please select a character to apply with") - if Application.objects.filter(character=self.cleaned_data['character']).exclude(status__in=[APPLICATION_STATUS_COMPLETED, APPLICATION_STATUS_REJECTED]).count(): + if Application.objects.filter(character=self.cleaned_data['character']).exclude(status__in=[APPLICATION_STATUS_NOTSUBMITTED, APPLICATION_STATUS_COMPLETED, APPLICATION_STATUS_REJECTED]).count(): raise forms.ValidationError("This character already has a open application") return self.cleaned_data['character']