Commit 745d8d00 by Shtarev

added comment

parent 0906bf2c
...@@ -108,6 +108,7 @@ class SearchFilter(BaseFilterBackend): ...@@ -108,6 +108,7 @@ class SearchFilter(BaseFilterBackend):
and_queries.append(reduce(operator.or_, or_queries)) and_queries.append(reduce(operator.or_, or_queries))
if and_queries: if and_queries:
# According to Oracle DB limits there is no capability to make a DISTINT on *LOB
if settings.DATABASES[queryset.db]["ENGINE"] == "django.db.backends.oracle": if settings.DATABASES[queryset.db]["ENGINE"] == "django.db.backends.oracle":
pk_list = queryset.filter(reduce(operator.and_, and_queries)).values_list('pk', flat=True) pk_list = queryset.filter(reduce(operator.and_, and_queries)).values_list('pk', flat=True)
return queryset.filter(pk__in=frozenset(pk_list)) return queryset.filter(pk__in=frozenset(pk_list))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment