mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Fix bug
This commit is contained in:
parent
d6b488deac
commit
db3d9cb468
2 changed files with 5 additions and 1 deletions
|
@ -154,6 +154,10 @@ class NsForm(ModelForm):
|
||||||
model = Ns
|
model = Ns
|
||||||
fields = ['zone', '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):
|
class DelNsForm(ModelForm):
|
||||||
ns = forms.ModelMultipleChoiceField(queryset=Ns.objects.all(), label="Enregistrements NS actuels", widget=forms.CheckboxSelectMultiple)
|
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':
|
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')
|
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':
|
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:
|
for d in data:
|
||||||
recherche['machines_list'].append(d.machine)
|
recherche['machines_list'].append(d.machine)
|
||||||
if i == '2':
|
if i == '2':
|
||||||
|
|
Loading…
Reference in a new issue