From: jlaine Date: Mon, 11 Apr 2011 12:40:43 +0000 (+0000) Subject: do not define queryset.delete(), the base implementation works X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=8174a9ef106740eb32151e47dad21a999f70b595;p=matthijs%2Fupstream%2Fdjango-ldapdb.git do not define queryset.delete(), the base implementation works git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@1036 e071eeec-0327-468d-9b6a-08194a12b294 --- diff --git a/ldapdb/models/query.py b/ldapdb/models/query.py index 6b1c223..e84748c 100644 --- a/ldapdb/models/query.py +++ b/ldapdb/models/query.py @@ -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) -