mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-09-12 01:03:09 +00:00
Fix alias form et infra right
This commit is contained in:
parent
e404f59b63
commit
2f8c9eaca3
1 changed files with 5 additions and 0 deletions
|
@ -175,7 +175,12 @@ class AliasForm(ModelForm):
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
|
||||||
|
infra = kwargs.pop('infra')
|
||||||
super(AliasForm, self).__init__(*args, prefix=prefix, **kwargs)
|
super(AliasForm, self).__init__(*args, prefix=prefix, **kwargs)
|
||||||
|
if not infra:
|
||||||
|
self.fields['extension'].queryset = Extension.objects.filter(
|
||||||
|
need_infra=False
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class DomainForm(AliasForm):
|
class DomainForm(AliasForm):
|
||||||
|
|
Loading…
Reference in a new issue