do not define queryset.delete(), the base implementation works
authorjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 11 Apr 2011 12:40:43 +0000 (12:40 +0000)
committerjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 11 Apr 2011 12:40:43 +0000 (12:40 +0000)
git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@1036 e071eeec-0327-468d-9b6a-08194a12b294

ldapdb/models/query.py

index 6b1c2233425738d489f8bb6a12b71753ff24bc2b..e84748c4ee00a35475d34e913e4824ed70a88cbe 100644 (file)
@@ -93,20 +93,3 @@ class QuerySet(BaseQuerySet):
             query = Query(model, WhereNode)
         super(QuerySet, self).__init__(model=model, query=query, using=using)
 
-    def delete(self):
-        "Bulk deletion."
-        connection = connections[self.db]
-        try:
-            vals = connection.search_s(
-                self.model.base_dn,
-                self.model.search_scope,
-                filterstr=compiler.query_as_ldap(self.query),
-                attrlist=[],
-            )
-        except ldap.NO_SUCH_OBJECT:
-            return
-
-        # FIXME : there is probably a more efficient way to do this 
-        for dn, attrs in vals:
-            connection.delete_s(dn)
-