8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-09 03:16:25 +00:00

Merge branch 'fix_search' into 'master'

Fix search

See merge request federez/re2o!107
This commit is contained in:
chirac 2018-03-27 04:26:09 +02:00
commit 9d28f33ca7

View file

@ -260,7 +260,7 @@ def search_single_word(word, filters, user,
) | Q(
machine_interface__domain__name__icontains=word
) | Q(
related__switch__domain__name__icontains=word
related__switch__interface__domain__name__icontains=word
) | Q(
radius__icontains=word
) | Q(
@ -277,9 +277,9 @@ def search_single_word(word, filters, user,
# Switches
if '7' in aff and Switch.can_view_all(user):
filter_switches = Q(
domain__name__icontains=word
interface__domain__name__icontains=word
) | Q(
ipv4__ipv4__icontains=word
interface__ipv4__ipv4__icontains=word
) | Q(
location__icontains=word
) | Q(
@ -289,7 +289,7 @@ def search_single_word(word, filters, user,
) | Q(
model__constructor__name__icontains=word
) | Q(
details__icontains=word
interface__details__icontains=word
)
if is_int(word):
filter_switches |= Q(