diff --git a/domains/forms.py b/domains/forms.py index 8c37daf..dd3cc9d 100644 --- a/domains/forms.py +++ b/domains/forms.py @@ -29,7 +29,7 @@ class DomainForm(MntFormMixin, WhoisObjectFormMixin, forms.ModelForm): self.fields['name'].disabled = True self.fields['nameservers'].queryset |= self.instance.nameservers.all() - self.fields['nameservers'].queryset.distinct() + self.fields['nameservers'].queryset = self.fields['nameservers'].queryset.distinct() def clean_name(self): name = self.cleaned_data['name'].lower() @@ -163,7 +163,7 @@ class ReverseZoneForm(forms.ModelForm): self.fields['prefix'].disabled = True self.fields['nameservers'].queryset |= self.instance.nameservers.all() - self.fields['nameservers'].queryset.distinct() + self.fields['nameservers'].queryset = self.fields['nameservers'].queryset.distinct() def clean(self): cleaned_data = super(ReverseZoneForm, self).clean()