This repository has been archived on 2019-10-12. You can view files and clone it, but cannot push or open issues or pull requests.

12 lines
340 B
Python

from django.db import connections
from ldapdb.backends.ldap.compiler import SQLCompiler, query_as_ldap
def get_filterstr(qs):
connection = connections['ldap']
compiler = SQLCompiler(
query=qs.query,
connection=connection,
using=None,
)
return query_as_ldap(qs.query, compiler, connection).filterstr