From fba40ee674bf866a897c31c8a2fc4303bd54ddc4 Mon Sep 17 00:00:00 2001 From: Sean Overton Date: Wed, 6 Dec 2023 00:40:03 +1100 Subject: [PATCH] issue-633: added already-in-org filter to target dropdown in org form --- web/targetApp/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/targetApp/forms.py b/web/targetApp/forms.py index c2aad7449..0f1b1c257 100644 --- a/web/targetApp/forms.py +++ b/web/targetApp/forms.py @@ -38,7 +38,7 @@ class AddOrganizationForm(forms.Form): def __init__(self, *args, **kwargs): project = kwargs.pop('project') super(AddOrganizationForm, self).__init__(*args, **kwargs) - self.fields['domains'].choices = [(domain.id, domain.name) for domain in Domain.objects.filter(project__slug=project)] + self.fields['domains'].choices = [(domain.id, domain.name) for domain in Domain.objects.filter(project__slug=project) if not domain.get_organization()] name = forms.CharField( required=True,