Hi - I'm wondering what the lines at the end of django/db/models/ deletion.py do:
for model, instances in self.data.iteritems(): for instance in instances: setattr(instance, model._meta.pk.attname, None) They're at the end of the delete method from Collector class, https://code.djangoproject.com/browser/django/trunk/django/db/models/deletion.py#L277 They came in in the original version of this file in https://code.djangoproject.com/changeset/14507 by carljm. I just don't quite get why this is needed (and I'm working on a django mod that is stopping declared immutable fields from being mutated -- sometimes throwing an exception) - I could make sure that it always silently fails, but I'm wondering why it exists at all. My guess would normally be something to do with freeing up garbage collection or something similar, but I can't see that with something that is 99% likely to be an integer. kind regards Tim http://red56.co.uk -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.