X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fdjango-ldapdb.git;a=blobdiff_plain;f=ldapdb%2Fbackends%2Fldap%2Fcompiler.py;fp=ldapdb%2Fbackends%2Fldap%2Fcompiler.py;h=3636ede49732edf247d1580a7e5340cfb807e2d4;hp=972606ff4589147a60ec52aa36b26038e047dbe5;hb=d8c01bc4028d5b030667acf34d003d8145c8c979;hpb=0b623815001f94b52d41b8ced53638d042ca9856 diff --git a/ldapdb/backends/ldap/compiler.py b/ldapdb/backends/ldap/compiler.py index 972606f..3636ede 100644 --- a/ldapdb/backends/ldap/compiler.py +++ b/ldapdb/backends/ldap/compiler.py @@ -46,7 +46,12 @@ def get_lookup_operator(lookup_type): return '=' def query_as_ldap(query): - filterstr = ''.join(['(objectClass=%s)' % cls for cls in query.model.object_classes]) + # TODO: Filtering on objectClass temporarily disabled, since this + # breaks Model.save() after an objectclass was added (it queries the + # database for the old values to see what changed, but filtering on + # the new objectclasses does not return the object). + #filterstr = ''.join(['(objectClass=%s)' % cls for cls in query.model.object_classes]) + filterstr = '' sql, params = where_as_ldap(query.where) filterstr += sql return '(&%s)' % filterstr