Trying to delete objects from the django admin or app code, I'm getting an error:
File "/home/styleseat/ssenv/lib/python2.6/site-packages/django/db/ models/base.py", line 595, in _collect_sub_objects sub_obj._collect_sub_objects(seen_objs, self, related.field.null) AttributeError: ‘NoneType’ object has no attribute ‘_collect_sub_objects’ I'm using django 1.2.1 final I think its easiest to decribe the models rather than post: I'm trying to delete a Pro object. Related models: we have GalleryImage objects, GalleryImage extends Image, GalleryImage has a FKs (null=True, blank=True) to Pro and to a Location object If the Pro has any GallleryImage objects with a null Location the error is thrown. If I assign a Location object to the GalleryImage then the Pro will delete, along with the GalleryImage objects and the Location object. Any thoughts? I can put together a simple test case and post a bug and/or work on a patch, but maybe its already been addressed in 1.3 Stack trace: File "/home/styleseat/ssenv/lib/python2.6/site-packages/django/contrib/ admin/options.py", line 1167, in delete_view (deleted_objects, perms_needed) = get_deleted_objects((obj,), opts, request.user, self.admin_site) File "/home/styleseat/ssenv/lib/python2.6/site-packages/django/contrib/ admin/util.py", line 111, in get_deleted_objects obj._collect_sub_objects(collector) File "/home/styleseat/ssenv/lib/python2.6/site-packages/django/db/ models/base.py", line 613, in _collect_sub_objects sub_obj._collect_sub_objects(seen_objs, self, related.field.null) File "/home/styleseat/ssenv/lib/python2.6/site-packages/django/db/ models/base.py", line 595, in _collect_sub_objects sub_obj._collect_sub_objects(seen_objs, self, related.field.null) AttributeError: ‘NoneType’ object has no attribute ‘_collect_sub_objects’ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.