8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 03:13:12 +00:00

Fix alias form et infra right

This commit is contained in:
chirac 2017-10-21 23:25:22 +02:00
parent e404f59b63
commit 2f8c9eaca3

View file

@ -175,7 +175,12 @@ class AliasForm(ModelForm):
def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
infra = kwargs.pop('infra')
super(AliasForm, self).__init__(*args, prefix=prefix, **kwargs)
if not infra:
self.fields['extension'].queryset = Extension.objects.filter(
need_infra=False
)
class DomainForm(AliasForm):