show only mobile results in search suggestions on mobile (bug 767620)
This commit is contained in:
Родитель
c020020b82
Коммит
691db7fa10
|
@ -400,10 +400,10 @@ class WebappSuggestionsAjax(SearchSuggestionsAjax):
|
|||
if excluded:
|
||||
if isinstance(res, S):
|
||||
# ES? Do fanciness.
|
||||
return res.filter(~F(id__in=excluded))
|
||||
res = res.filter(~F(id__in=excluded))
|
||||
else:
|
||||
# Django ORM? Do an `exclude`.
|
||||
return res.exclude(id__in=excluded)
|
||||
res = res.exclude(id__in=excluded)
|
||||
|
||||
if getattr(self.request, 'MOBILE', False):
|
||||
res = res.filter(device=amo.DEVICE_MOBILE.id)
|
||||
|
|
Загрузка…
Ссылка в новой задаче