mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 00:43:46 +00:00
Fix bug
This commit is contained in:
parent
133d83f282
commit
72ec33d967
2 changed files with 5 additions and 1 deletions
|
@ -154,6 +154,10 @@ class NsForm(ModelForm):
|
|||
model = Ns
|
||||
fields = ['zone', 'ns']
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(NsForm, self).__init__(*args, **kwargs)
|
||||
self.fields['ns'].queryset = Domain.objects.exclude(interface_parent=None)
|
||||
|
||||
class DelNsForm(ModelForm):
|
||||
ns = forms.ModelMultipleChoiceField(queryset=Ns.objects.all(), label="Enregistrements NS actuels", widget=forms.CheckboxSelectMultiple)
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ def search_result(search, type, request):
|
|||
if i == '0':
|
||||
recherche['users_list'] = User.objects.filter((Q(room__name__icontains = search) | Q(pseudo__icontains = search) | Q(name__icontains = search) | Q(surname__icontains = search)) & query1).order_by('state', 'surname')
|
||||
if i == '1':
|
||||
data = Interface.objects.filter(Q(machine__user__pseudo__icontains = search) | Q(machine__user__name__icontains = search) | Q(machine__user__surname__icontains = search) | Q(mac_address__icontains = search) | Q(ipv4__ipv4__icontains = search))
|
||||
data = Interface.objects.filter(Q(machine__user__pseudo__icontains = search) | Q(machine__user__name__icontains = search) | Q(machine__user__surname__icontains = search) | Q(mac_address__icontains = search) | Q(ipv4__ipv4__icontains = search) | Q(domain__name__icontains = search) | Q(domain__related_domain__name__icontains = search))
|
||||
for d in data:
|
||||
recherche['machines_list'].append(d.machine)
|
||||
if i == '2':
|
||||
|
|
Loading…
Reference in a new issue