Skip to content

Commit

Permalink
Merge pull request #1106 from SeanOverton/633-remove-target-from-org-…
Browse files Browse the repository at this point in the history
…dropdown-when-in-use

issue-633: added already-in-org filter to target dropdown in org form
  • Loading branch information
AnonymousWP authored Dec 5, 2023
2 parents 6132ab9 + fba40ee commit 0cf1d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/targetApp/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0cf1d17

Please sign in to comment.