From 385030ce5d1bb3a1879efb1f2dcade337336bb4f Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 2 Sep 2011 07:11:36 +0100 Subject: [PATCH] Distinct checks on new application forms --- app/hr/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/hr/forms.py b/app/hr/forms.py index 0f12bb5..d2c1866 100644 --- a/app/hr/forms.py +++ b/app/hr/forms.py @@ -12,7 +12,7 @@ from eve_api.app_defines import API_STATUS_OK def CreateRecommendationForm(user): """ Generate a Recommendation form based on the user's permissions """ - characters = EVEPlayerCharacter.objects.filter(eveaccount__user=user) + characters = EVEPlayerCharacter.objects.filter(eveaccount__user=user).distinct() applications = Application.objects.filter(status=APPLICATION_STATUS_NOTSUBMITTED) class RecommendationForm(forms.Form): @@ -27,7 +27,7 @@ def CreateRecommendationForm(user): def CreateApplicationForm(user): """ Generate a Application form based on the user's permissions """ - characters = EVEPlayerCharacter.objects.filter(eveaccount__user=user, eveaccount__api_status=API_STATUS_OK) + characters = EVEPlayerCharacter.objects.filter(eveaccount__user=user, eveaccount__api_status=API_STATUS_OK).distinct() corporations = EVEPlayerCorporation.objects.filter(application_config__is_accepting=True) class ApplicationForm(forms.Form):