Ticket #6915: 6915.naive-patch.diff
File 6915.naive-patch.diff, 755 bytes (added by , 16 years ago) |
---|
-
django/db/models/query.py
270 270 del_query.query.select_related = False 271 271 del_query.query.clear_ordering() 272 272 273 # Delete objects individually if self.model has a custom delete() 274 # method. See ticket #6915. 275 from django.db.models.base import Model 276 if self.model is not None and self.model.delete != Model.delete: 277 for obj in self: 278 obj.delete() 279 return 280 273 281 # Delete objects in chunks to prevent the list of related objects from 274 282 # becoming too long. 275 283 while 1: